Docs For Class Zend_Search_Lucene_Search_Weight

## Class Zend_Search_Lucene_Search_Weight

Description

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.

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/Search/Weight.php (line 38)

Direct descendents

Class | Description
--- | ---
Zend_Search_Lucene_Search_Weight_MultiTerm |
Zend_Search_Lucene_Search_Weight_Phrase |
Zend_Search_Lucene_Search_Weight_Term |
Zend_Search_Lucene_Search_Weight_Boolean |

Variable Summary
float $_queryNorm
float $_value
Method Summary
float getValue ()
void normalize (mixed $norm)
float sumOfSquaredWeights ()
Variables
float $_queryNorm (line 46)

Normalization factor.

This value is stored only for query expanation purpose and not used in any other place

- access: protected

float $_value (line 57)

Weight value

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

- access: protected

Methods
getValue (line 65)

The weight for this query.

- access: public

float getValue ()

Redefined in descendants as:

- Zend_Search_Lucene_Search_Weight_MultiTerm::getValue() : The weight for this query Standard Weight::$_value is not used for boolean queries
- Zend_Search_Lucene_Search_Weight_Boolean::getValue() : The weight for this query Standard Weight::$_value is not used for boolean queries

normalize (line 82)

Assigns the query normalization factor to this.

- access: public
- abstract:

void normalize (mixed $norm)

Redefined in descendants as:

- Zend_Search_Lucene_Search_Weight_MultiTerm::normalize() : Assigns the query normalization factor to this.
- Zend_Search_Lucene_Search_Weight_Phrase::normalize() : Assigns the query normalization factor to this.
- Zend_Search_Lucene_Search_Weight_Term::normalize() : Assigns the query normalization factor to this.
- Zend_Search_Lucene_Search_Weight_Boolean::normalize() : Assigns the query normalization factor to this.

sumOfSquaredWeights (line 75)

The sum of squared weights of contained query clauses.

- access: public
- abstract:

float sumOfSquaredWeights ()

Redefined in descendants as:

- Zend_Search_Lucene_Search_Weight_MultiTerm::sumOfSquaredWeights() : The sum of squared weights of contained query clauses.
- Zend_Search_Lucene_Search_Weight_Phrase::sumOfSquaredWeights() : The sum of squared weights of contained query clauses.
- Zend_Search_Lucene_Search_Weight_Term::sumOfSquaredWeights() : The sum of squared weights of contained query clauses.
- Zend_Search_Lucene_Search_Weight_Boolean::sumOfSquaredWeights() : The sum of squared weights of contained query clauses.

Documentation generated on Sun, 29 Oct 2006 21:27:37 -0600 by phpDocumentor 1.3.0RC6