\Zend_Search_Lucene_Search_Similarity
- 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
{
- // members
- private static Zend_Search_Lucene_Search_Similarity $_defaultImpl;
- private static array $_normTable = ;
- // methods
- 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()
- private static float _floatToByte()
- public abstract float tf()
- public abstract float sloppyFreq()
- public a idf()
- public abstract float idfFreq()
- public abstract float coord()
Members
private
- $_defaultImpl
—
Zend_Search_Lucene_Search_Similarity
The Similarity implementation used by default. - $_normTable
—
array
Cache of decoded bytes.
Methods
private
- _floatToByte() — Float to byte conversion
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.