Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef SPANNEARQUERY_H
8 #define SPANNEARQUERY_H
48 virtual String toString(
const String& field);
Base class for span-based queries.
Definition: SpanQuery.h:15
int32_t slop
Definition: SpanNearQuery.h:28
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
SpanNearQuery(Collection< SpanQueryPtr > clauses, int32_t slop, bool inOrder, bool collectPayloads=true)
Construct a SpanNearQuery. Matches spans matching a span from each clause, with up to slop total unma...
bool inOrder
Definition: SpanNearQuery.h:29
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Collection< SpanQueryPtr > clauses
Definition: SpanNearQuery.h:24
Collection< SpanQueryPtr > getClauses()
Return the clauses whose spans are matched.
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
virtual int32_t hashCode()
Return hash code for this object.
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
virtual SpansPtr getSpans(const IndexReaderPtr &reader)
Returns the matches for this query in an index. Used internally to search for spans.
bool collectPayloads
Definition: SpanNearQuery.h:32
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...
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
bool isInOrder()
Return true if matches are required to be in-order.
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
virtual QueryPtr rewrite(const IndexReaderPtr &reader)
Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into ...
String field
Definition: SpanNearQuery.h:31
boost::shared_ptr< Spans > SpansPtr
Definition: LuceneTypes.h:453
Matches spans which are near one another. One can specify slop, the maximum number of intervening unm...
Definition: SpanNearQuery.h:16
virtual String getField()
Returns the name of the field matched by this query.
int32_t getSlop()
Return the maximum number of intervening unmatched positions permitted.
virtual String toString()
Prints a query to a string.
clucene.sourceforge.net