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


lucene::search::FuzzyTermEnum Class Reference

FuzzyTermEnum is a subclass of FilteredTermEnum for enumerating all terms that are similiar to the specified filter term. More...

#include <FuzzyQuery.h>

Inheritance diagram for lucene::search::FuzzyTermEnum:

lucene::search::FilteredTermEnum lucene::index::TermEnum

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.

Detailed Description

FuzzyTermEnum is a subclass of FilteredTermEnum for enumerating all terms that are similiar to the specified filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.


Constructor & Destructor Documentation

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.

Parameters:
reader 
term 
Exceptions:
IOException 
See also:
FuzzyTermEnum(IndexReader, Term, float_t, int32_t)

lucene::search::FuzzyTermEnum::~FuzzyTermEnum (  ) 

Destructor.


Member Function Documentation

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]

Close the enumeration.

Reimplemented from lucene::search::FilteredTermEnum.

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]


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

clucene.sourceforge.net