~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to search/Zend/Search/Lucene/Search/Weight/Term.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 * @category   Zend
16
16
 * @package    Zend_Search_Lucene
17
17
 * @subpackage Search
18
 
 * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
 
18
 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19
19
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
20
20
 */
21
21
 
28
28
 * @category   Zend
29
29
 * @package    Zend_Search_Lucene
30
30
 * @subpackage Search
31
 
 * @copyright  Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)
 
31
 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
32
32
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
33
33
 */
34
34
class Zend_Search_Lucene_Search_Weight_Term extends Zend_Search_Lucene_Search_Weight
36
36
    /**
37
37
     * IndexReader.
38
38
     *
39
 
     * @var Zend_Search_Lucene
 
39
     * @var Zend_Search_Lucene_Interface
40
40
     */
41
41
    private $_reader;
42
42
 
55
55
    private $_query;
56
56
 
57
57
    /**
58
 
     * Weight value
59
 
     *
60
 
     * @var float
61
 
     */
62
 
    private $_value;
63
 
 
64
 
    /**
65
58
     * Score factor
66
59
     *
67
60
     * @var float
69
62
    private $_idf;
70
63
 
71
64
    /**
72
 
     * Normalization factor
73
 
     *
74
 
     * @var float
75
 
     */
76
 
    private $_queryNorm;
77
 
 
78
 
 
79
 
    /**
80
65
     * Query weight
81
66
     *
82
67
     * @var float
88
73
     * Zend_Search_Lucene_Search_Weight_Term constructor
89
74
     * reader - index reader
90
75
     *
91
 
     * @param Zend_Search_Lucene $reader
 
76
     * @param Zend_Search_Lucene_Index_Term   $term
 
77
     * @param Zend_Search_Lucene_Search_Query $query
 
78
     * @param Zend_Search_Lucene_Interface    $reader
92
79
     */
93
 
    public function __construct($term, $query, $reader)
 
80
    public function __construct(Zend_Search_Lucene_Index_Term   $term,
 
81
                                Zend_Search_Lucene_Search_Query $query,
 
82
                                Zend_Search_Lucene_Interface    $reader)
94
83
    {
95
84
        $this->_term   = $term;
96
85
        $this->_query  = $query;
99
88
 
100
89
 
101
90
    /**
102
 
     * The weight for this query
103
 
     *
104
 
     * @return float
105
 
     */
106
 
    public function getValue()
107
 
    {
108
 
        return $this->_value;
109
 
    }
110
 
 
111
 
 
112
 
    /**
113
91
     * The sum of squared weights of contained query clauses.
114
92
     *
115
93
     * @return float