Implemented as 'overlap/maxOverlap'.
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.
Implemented as 'log(numDocs/(docFreq+1)) + 1'.
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.
Implemented as '1/sqrt(numTerms)'.
float
lengthNorm
(string $fieldName, integer $numTerms)
-
string
$fieldName
-
integer
$numTerms
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.
Implemented as '1/sqrt(sumOfSquaredWeights)'.
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.
Implemented as 'sqrt(freq)'.
float
tf
(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()