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


lucene::search::MultiTermQuery Class Reference

A Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration. More...

#include <MultiTermQuery.h>

Inheritance diagram for lucene::search::MultiTermQuery:

lucene::search::Query lucene::search::FuzzyQuery lucene::search::WildcardQuery

Public Member Functions

 MultiTermQuery (lucene::index::Term *t)
 Constructs a query for terms matching term.
virtual ~MultiTermQuery ()
lucene::index::TermgetTerm (bool pointer=true) const
 Returns the pattern term.
Querycombine (Query **queries)
 Expert: called when re-writing queries under MultiSearcher.
TCHAR * toString (const TCHAR *field) const
 Prints a user-readable version of this query.
Queryrewrite (lucene::index::IndexReader *reader)
 Expert: called to re-write queries into primitive queries.

Protected Member Functions

 MultiTermQuery (const MultiTermQuery &clone)
virtual FilteredTermEnumgetEnum (lucene::index::IndexReader *reader)=0
 Construct the enumeration to be used, expanding the pattern term.

Detailed Description

A Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.

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.


Constructor & Destructor Documentation

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]


Member Function Documentation

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.

Query* lucene::search::MultiTermQuery::combine ( Query **  queries  )  [virtual]

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.


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

clucene.sourceforge.net