Lucene++ - a full-featured, c++ search engine
API Documentation
A query that applies a filter to the results of another query. More...
#include <FilteredQuery.h>
Public Member Functions | |
FilteredQuery (QueryPtr query, FilterPtr filter) | |
Constructs a new query which applies a filter to the results of the original query. Filter::getDocIdSet() will be called every time this query is used in a search. More... | |
virtual | ~FilteredQuery () |
virtual String | getClassName () |
boost::shared_ptr< FilteredQuery > | shared_from_this () |
virtual WeightPtr | createWeight (SearcherPtr searcher) |
Returns a Weight that applies the filter to the enclosed query's Weight. This is accomplished by overriding the Scorer returned by the Weight. More... | |
virtual QueryPtr | rewrite (IndexReaderPtr reader) |
Rewrites the wrapped query. More... | |
QueryPtr | getQuery () |
FilterPtr | getFilter () |
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 form. More... | |
virtual String | toString (const String &field) |
Prints a user-readable version of this query. More... | |
virtual bool | equals (LuceneObjectPtr other) |
Return whether two objects are equal. More... | |
virtual int32_t | hashCode () |
Return hash code for this object. More... | |
virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr()) |
Returns a clone of this query. More... | |
![]() | |
Query () | |
virtual | ~Query () |
boost::shared_ptr< Query > | shared_from_this () |
virtual void | setBoost (double b) |
Sets the boost for this query clause to b. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. More... | |
virtual double | getBoost () |
Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. The boost is 1.0 by default. More... | |
virtual String | toString () |
Prints a query to a string. More... | |
virtual WeightPtr | weight (SearcherPtr searcher) |
Constructs and initializes a Weight for a top-level query. More... | |
virtual QueryPtr | combine (Collection< QueryPtr > queries) |
Called when re-writing queries under MultiSearcher. More... | |
virtual SimilarityPtr | getSimilarity (SearcherPtr searcher) |
Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned. More... | |
String | boostString () |
Return given boost value as a string. More... | |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. More... | |
virtual int32_t | compareTo (LuceneObjectPtr other) |
Compare two objects. More... | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. More... | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. More... | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. More... | |
virtual void | unlock () |
Unlock this object. More... | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. More... | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. More... | |
virtual void | notifyAll () |
Notify all threads waiting for signal. More... | |
Static Public Member Functions | |
static String | _getClassName () |
![]() | |
static String | _getClassName () |
static QueryPtr | mergeBooleanQueries (Collection< BooleanQueryPtr > queries) |
Merges the clauses of a set of BooleanQuery's into a single BooleanQuery. More... | |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
![]() | |
double | boost |
A query that applies a filter to the results of another query.
Note: the bits are retrieved from the filter each time this query is used in a search - use a CachingWrapperFilter to avoid regenerating the bits every time.
Constructs a new query which applies a filter to the results of the original query. Filter::getDocIdSet() will be called every time this query is used in a search.
|
virtual |
|
inlinestatic |
|
virtual |
Returns a clone of this query.
Reimplemented from Lucene::Query.
|
virtual |
Returns a Weight that applies the filter to the enclosed query's Weight. This is accomplished by overriding the Scorer returned by the Weight.
Reimplemented from Lucene::Query.
|
virtual |
Return whether two objects are equal.
Reimplemented from Lucene::Query.
|
virtual |
Adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.
Reimplemented from Lucene::Query.
|
inlinevirtual |
Reimplemented from Lucene::Query.
FilterPtr Lucene::FilteredQuery::getFilter | ( | ) |
QueryPtr Lucene::FilteredQuery::getQuery | ( | ) |
|
virtual |
Return hash code for this object.
Reimplemented from Lucene::Query.
|
virtual |
Rewrites the wrapped query.
Reimplemented from Lucene::Query.
|
inline |
|
virtual |
Prints a user-readable version of this query.
Reimplemented from Lucene::Query.