Calculate query weights and build query scorers.
A Weight is constructed by a query Query->createWeight(). The sumOfSquaredWeights() method is then called on the top-level query to compute the query normalization factor Similarity->queryNorm(float). This factor is then passed to normalize(float). At this point the weighting is complete.
category | Zend |
---|---|
package | Zend_Search_Lucene |
subpackage | Search |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Search_Lucene_Search_Weight |
__construct(\Zend_Search_Lucene_Search_Query_Phrase $query, \Zend_Search_Lucene_Interface $reader)
\Zend_Search_Lucene_Search_Query_Phrase
\Zend_Search_Lucene_Interface
getValue() : float
float
normalize(float $queryNorm)
inherited_from | \Zend_Search_Lucene_Search_Weight::normalize() |
---|
float
normalize(float $norm)
float
sumOfSquaredWeights() : float
inherited_from | \Zend_Search_Lucene_Search_Weight::sumOfSquaredWeights() |
---|
float
sumOfSquaredWeights() : float
float
$_queryNorm : float
This value is stored only for query expanation purpose and not used in any other place
$_value : float
Weight value may be initialized in sumOfSquaredWeights() or normalize() because they both are invoked either in Query::_initWeight (for top-level query) or in corresponding methods of parent query's weights
$_idf : float
$_query : \Zend_Search_Lucene_Search_Query_Phrase
$_reader : \Zend_Search_Lucene_Interface