CLucene - a full-featured, c++ search engine
API Documentation
#include <FuzzyQuery.h>
Public Member Functions | |
FuzzyTermEnum (const lucene::index::IndexReader *reader, lucene::index::Term *term, float_t minSimilarity=FuzzyQuery::defaultMinSimilarity, size_t prefixLength=0) | |
Empty prefix and minSimilarity of 0.5f are used. | |
~FuzzyTermEnum () | |
Destructor. | |
void | close () |
Close the enumeration. | |
float_t | difference () |
Returns the difference between the distance and the fuzzy threshold multiplied by the scale factor. | |
const char * | getObjectName () |
Because we need to know how to cast the object, we need the objects name. | |
Static Public Member Functions | |
static const char * | getClassName () |
Protected Member Functions | |
bool | termCompare (lucene::index::Term *term) |
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term. | |
bool | endEnum () |
Returns the fact if the current term in the enumeration has reached the end. |
Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.
lucene::search::FuzzyTermEnum::FuzzyTermEnum | ( | const lucene::index::IndexReader * | reader, | |
lucene::index::Term * | term, | |||
float_t | minSimilarity = FuzzyQuery::defaultMinSimilarity , |
|||
size_t | prefixLength = 0 | |||
) |
Empty prefix and minSimilarity of 0.5f are used.
reader | ||
term |
IOException |
lucene::search::FuzzyTermEnum::~FuzzyTermEnum | ( | ) |
Destructor.
bool lucene::search::FuzzyTermEnum::termCompare | ( | lucene::index::Term * | term | ) | [protected, virtual] |
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.
Implements lucene::search::FilteredTermEnum.
bool lucene::search::FuzzyTermEnum::endEnum | ( | ) | [protected, virtual] |
Returns the fact if the current term in the enumeration has reached the end.
Implements lucene::search::FilteredTermEnum.
void lucene::search::FuzzyTermEnum::close | ( | ) | [virtual] |
float_t lucene::search::FuzzyTermEnum::difference | ( | ) | [virtual] |
Returns the difference between the distance and the fuzzy threshold multiplied by the scale factor.
Implements lucene::search::FilteredTermEnum.
const char* lucene::search::FuzzyTermEnum::getObjectName | ( | ) | [inline, virtual] |
Because we need to know how to cast the object, we need the objects name.
Implements lucene::index::TermEnum.
static const char* lucene::search::FuzzyTermEnum::getClassName | ( | ) | [inline, static] |