\Zend_Search_Lucene_Search_Similarity_Default
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_Search_Similarity_Default
extends Zend_Search_Lucene_Search_Similarity
{
- // methods
- public float lengthNorm()
- public float queryNorm()
- public float tf()
- public float sloppyFreq()
- public float idfFreq()
- public float coord()
- // Inherited methods from Zend_Search_Lucene_Search_Similarity
- public static void setDefault()
- public static Zend_Search_Lucene_Search_Similarity getDefault()
- public abstract float lengthNorm()
- public abstract float queryNorm()
- public static float decodeNorm()
- public static integer encodeNorm()
- public abstract float tf()
- public abstract float sloppyFreq()
- public a idf()
- public abstract float idfFreq()
- public abstract float coord()
Hierarchy
Methods
public
- coord() — Implemented as 'overlap/maxOverlap'.
- idfFreq() — Implemented as 'log(numDocs/(docFreq+1)) + 1'.
- lengthNorm() — Implemented as '1/sqrt(numTerms)'.
- queryNorm() — Implemented as '1/sqrt(sumOfSquaredWeights)'.
- sloppyFreq() — Implemented as '1/(distance + 1)'.
- tf() — Implemented as 'sqrt(freq)'.
Inherited from Zend_Search_Lucene_Search_Similarity
public
- coord() — Computes a score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores.
- decodeNorm() — Decodes a normalization factor stored in an index.
- encodeNorm() — Encodes a normalization factor for storage in an index.
- getDefault() — Return the default Similarity implementation used by indexing and search code.
- idf() — Computes a score factor for a simple term or a phrase.
- 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() — 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() — 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.
- setDefault() — Set the default Similarity implementation used by indexing and search code.
- sloppyFreq() — Computes the amount of a sloppy phrase match, based on an edit distance.
- 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.