Docs For Class Zend_Search_Lucene_Search_Similarity_Default

## Class Zend_Search_Lucene_Search_Similarity_Default

Description

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

Located in /Zend/Search/Lucene/Search/Similarity/Default.php (line 30)

    Zend_Search_Lucene_Search_Similarity
       |
       --Zend_Search_Lucene_Search_Similarity_Default

Method Summary
float coord (integer $overlap, integer $maxOverlap)
float idfFreq (integer $docFreq, integer $numDocs)
float lengthNorm (string $fieldName, mixed $numTerms)
float queryNorm (float $sumOfSquaredWeights)
float sloppyFreq (integer $distance)
float tf (float $freq)
Methods
coord (line 101)

Implemented as 'overlap/maxOverlap'.

- access: public

float coord (integer $overlap, integer $maxOverlap)

- integer $overlap
- integer $maxOverlap

Redefinition of:

Zend_Search_Lucene_Search_Similarity::coord()
  Computes a score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores.

idfFreq (line 89)

Implemented as 'log(numDocs/(docFreq+1)) + 1'.

- access: public

float idfFreq (integer $docFreq, integer $numDocs)

- integer $docFreq
- integer $numDocs

Redefinition of:

Zend_Search_Lucene_Search_Similarity::idfFreq()
  Computes a score factor based on a term's document frequency (the number of documents which contain the term). This value is multiplied by the tf(int) factor for each term in the query and these products are then summed to form the initial score for a document.

lengthNorm (line 40)

Implemented as '1/sqrt(numTerms)'.

- access: public

float lengthNorm (string $fieldName, mixed $numTerms)

- string $fieldName

Redefinition of:

Zend_Search_Lucene_Search_Similarity::lengthNorm()
  Computes the normalization value for a field given the total number of terms contained in a field. These values, together with field boosts, are stored in an index and multipled into scores for hits on each field by the search code.

queryNorm (line 55)

Implemented as '1/sqrt(sumOfSquaredWeights)'.

- access: public

float queryNorm (float $sumOfSquaredWeights)

- float $sumOfSquaredWeights

Redefinition of:

Zend_Search_Lucene_Search_Similarity::queryNorm()
  Computes the normalization value for a query given the sum of the squared weights of each of the query terms. This value is then multipled into the weight of each query term.

sloppyFreq (line 77)

Implemented as '1/(distance + 1)'.

- access: public

float sloppyFreq (integer $distance)

- integer $distance

Redefinition of:

Zend_Search_Lucene_Search_Similarity::sloppyFreq()
  Computes the amount of a sloppy phrase match, based on an edit distance.

tf (line 66)

Implemented as 'sqrt(freq)'.

- access: public

float tf (float $freq)

- float $freq

Redefinition of:

Zend_Search_Lucene_Search_Similarity::tf()
  Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the idf(Term, Searcher) factor for each term in the query and these products are then summed to form the initial score for a document.

#### Inherited Methods

Inherited From Zend_Search_Lucene_Search_Similarity

> Zend_Search_Lucene_Search_Similarity::coord()
> Zend_Search_Lucene_Search_Similarity::decodeNorm()
> Zend_Search_Lucene_Search_Similarity::encodeNorm()
> Zend_Search_Lucene_Search_Similarity::getDefault()
> Zend_Search_Lucene_Search_Similarity::idf()
> Zend_Search_Lucene_Search_Similarity::idfFreq()
> Zend_Search_Lucene_Search_Similarity::lengthNorm()
> Zend_Search_Lucene_Search_Similarity::queryNorm()
> Zend_Search_Lucene_Search_Similarity::setDefault()
> Zend_Search_Lucene_Search_Similarity::sloppyFreq()
> Zend_Search_Lucene_Search_Similarity::tf()

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