Lucene++ - a full-featured, c++ search engine
API Documentation
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
void setSlop(int32_t slop)
Sets the number of other words permitted between words in query phrase. If zero, then this is an exac...
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
A Query that matches documents containing a particular sequence of terms. A PhraseQuery is built by Q...
Definition: PhraseQuery.h:18
String field
Definition: PhraseQuery.h:24
void add(const TermPtr &term, int32_t position)
Adds a term to the end of the query phrase. The relative position of the term within the phrase is sp...
int32_t maxPosition
Definition: PhraseQuery.h:30
virtual String toString(const String &field)
Prints a user-readable version of this query.
Definition: AbstractAllTermDocs.h:12
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
PhraseQuery()
Constructs an empty phrase query.
int32_t getSlop()
Returns the slop.
boost::shared_ptr< Weight > WeightPtr
Definition: LuceneTypes.h:480
Collection< int32_t > getPositions()
Returns the relative positions of terms in this phrase.
Collection< TermPtr > getTerms()
Returns the set of terms in this phrase.
The abstract base class for queries.
Definition: Query.h:31
Collection< TermPtr > terms
Definition: PhraseQuery.h:28
virtual int32_t hashCode()
Return hash code for this object.
int32_t slop
Definition: PhraseQuery.h:31
Collection< int32_t > positions
Definition: PhraseQuery.h:29
virtual WeightPtr createWeight(const SearcherPtr &searcher)
Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries...
virtual void extractTerms(SetTerm terms)
Adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten...
void add(const TermPtr &term)
Adds a term to the end of the query phrase. The relative position of the term is the one immediately ...
virtual String toString()
Prints a query to a string.
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
boost::shared_ptr< Searcher > SearcherPtr
Definition: LuceneTypes.h:434
clucene.sourceforge.net