CLucene - a full-featured, c++ search engine
API Documentation
#include <MultiTermQuery.h>
Public Member Functions | |
MultiTermQuery (lucene::index::Term *t) | |
Constructs a query for terms matching term . | |
virtual | ~MultiTermQuery () |
lucene::index::Term * | getTerm (bool pointer=true) const |
Returns the pattern term. | |
Query * | combine (Query **queries) |
Expert: called when re-writing queries under MultiSearcher. | |
TCHAR * | toString (const TCHAR *field) const |
Prints a user-readable version of this query. | |
Query * | rewrite (lucene::index::IndexReader *reader) |
Expert: called to re-write queries into primitive queries. | |
Protected Member Functions | |
MultiTermQuery (const MultiTermQuery &clone) | |
virtual FilteredTermEnum * | getEnum (lucene::index::IndexReader *reader)=0 |
Construct the enumeration to be used, expanding the pattern term. |
MultiTermQuery
is not designed to be used by itself.
The reason being that it is not intialized with a FilteredTermEnum enumeration. A FilteredTermEnum enumeration needs to be provided.
For example, WildcardQuery and FuzzyQuery extend MultiTermQuery
to provide WildcardTermEnum and FuzzyTermEnum, respectively.
lucene::search::MultiTermQuery::MultiTermQuery | ( | const MultiTermQuery & | clone | ) | [protected] |
lucene::search::MultiTermQuery::MultiTermQuery | ( | lucene::index::Term * | t | ) |
Constructs a query for terms matching term
.
virtual lucene::search::MultiTermQuery::~MultiTermQuery | ( | ) | [virtual] |
virtual FilteredTermEnum* lucene::search::MultiTermQuery::getEnum | ( | lucene::index::IndexReader * | reader | ) | [protected, pure virtual] |
Construct the enumeration to be used, expanding the pattern term.
Implemented in lucene::search::FuzzyQuery, and lucene::search::WildcardQuery.
lucene:: index ::Term* lucene::search::MultiTermQuery::getTerm | ( | bool | pointer = true |
) | const |
Returns the pattern term.
Expert: called when re-writing queries under MultiSearcher.
Only implemented by derived queries, with no _createWeight(Searcher) implementatation.
Reimplemented from lucene::search::Query.
TCHAR* lucene::search::MultiTermQuery::toString | ( | const TCHAR * | field | ) | const [virtual] |
Prints a user-readable version of this query.
Implements lucene::search::Query.
Reimplemented in lucene::search::FuzzyQuery.
Query* lucene::search::MultiTermQuery::rewrite | ( | lucene::index::IndexReader * | reader | ) | [virtual] |
Expert: called to re-write queries into primitive queries.
Reimplemented from lucene::search::Query.
Reimplemented in lucene::search::WildcardQuery.