CLucene - a full-featured, c++ search engine
API Documentation


lucene::search::DefaultSimilarity Class Reference

Expert: Default scoring implementation. More...

#include <Similarity.h>

Inheritance diagram for lucene::search::DefaultSimilarity:

lucene::search::Similarity

Public Member Functions

 DefaultSimilarity ()
 ~DefaultSimilarity ()
float_t lengthNorm (const TCHAR *fieldName, int32_t numTerms)
 Implemented as 1/sqrt(numTerms).
float_t queryNorm (float_t sumOfSquaredWeights)
 Implemented as 1/sqrt(sumOfSquaredWeights).
float_t tf (float_t freq)
 Implemented as sqrt(freq).
float_t sloppyFreq (int32_t distance)
 Implemented as 1 / (distance + 1).
float_t idf (int32_t docFreq, int32_t numDocs)
 Implemented as log(numDocs/(docFreq+1)) + 1.
float_t coord (int32_t overlap, int32_t maxOverlap)
 Implemented as overlap / maxOverlap.

Detailed Description

Expert: Default scoring implementation.


Constructor & Destructor Documentation

lucene::search::DefaultSimilarity::DefaultSimilarity (  ) 

lucene::search::DefaultSimilarity::~DefaultSimilarity (  ) 


Member Function Documentation

float_t lucene::search::DefaultSimilarity::lengthNorm ( const TCHAR *  fieldName,
int32_t  numTerms 
) [virtual]

Implemented as 1/sqrt(numTerms).

Implements lucene::search::Similarity.

float_t lucene::search::DefaultSimilarity::queryNorm ( float_t  sumOfSquaredWeights  )  [virtual]

Implemented as 1/sqrt(sumOfSquaredWeights).

Implements lucene::search::Similarity.

float_t lucene::search::DefaultSimilarity::tf ( float_t  freq  )  [inline, virtual]

Implemented as sqrt(freq).

Implements lucene::search::Similarity.

float_t lucene::search::DefaultSimilarity::sloppyFreq ( int32_t  distance  )  [virtual]

Implemented as 1 / (distance + 1).

Implements lucene::search::Similarity.

float_t lucene::search::DefaultSimilarity::idf ( int32_t  docFreq,
int32_t  numDocs 
) [virtual]

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

Implements lucene::search::Similarity.

float_t lucene::search::DefaultSimilarity::coord ( int32_t  overlap,
int32_t  maxOverlap 
) [virtual]

Implemented as overlap / maxOverlap.

Implements lucene::search::Similarity.


The documentation for this class was generated from the following file:

clucene.sourceforge.net