Lucene++ - a full-featured, c++ search engine
API Documentation
A Query that matches numeric values within a specified range. To use this, you must first index the numeric values using NumericField (expert: NumericTokenStream). If your terms are instead textual, you should use TermRangeQuery. NumericRangeFilter is the filter equivalent of this query. More...
#include <NumericRangeQuery.h>
Inheritance diagram for Lucene::NumericRangeQuery:Public Member Functions | |
| NumericRangeQuery (const String &field, int32_t precisionStep, int32_t valSize, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive) | |
| virtual | ~NumericRangeQuery () |
| virtual String | getClassName () |
| boost::shared_ptr< NumericRangeQuery > | shared_from_this () |
| String | getField () |
| Returns the field name for this query. More... | |
| bool | includesMin () |
| Returns true if the lower endpoint is inclusive. More... | |
| bool | includesMax () |
| Returns true if the upper endpoint is inclusive. More... | |
| NumericValue | getMin () |
| Returns the lower value of this range query. More... | |
| NumericValue | getMax () |
| Returns the upper value of this range query. More... | |
| virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Returns a clone of this query. More... | |
| virtual String | toString (const String &field) |
| Prints a query to a string, with field assumed to be the default field and omitted. More... | |
| virtual bool | equals (const LuceneObjectPtr &other) |
| Return whether two objects are equal. More... | |
| virtual int32_t | hashCode () |
| Return hash code for this object. More... | |
Public Member Functions inherited from Lucene::MultiTermQuery | |
| MultiTermQuery () | |
| virtual | ~MultiTermQuery () |
| boost::shared_ptr< MultiTermQuery > | shared_from_this () |
| int32_t | getTotalNumberOfTerms () |
| Return the number of unique terms visited during execution of the query. If there are many of them, you may consider using another query type or optimize your total term count in index. More... | |
| void | clearTotalNumberOfTerms () |
| Resets the counting of unique terms. Do this before executing the query/filter. More... | |
| virtual QueryPtr | rewrite (const IndexReaderPtr &reader) |
| Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys. More... | |
| virtual RewriteMethodPtr | getRewriteMethod () |
| virtual void | setRewriteMethod (const RewriteMethodPtr &method) |
| Sets the rewrite method to be used when executing the query. You can use one of the four core methods, or implement your own subclass of RewriteMethod. More... | |
Public Member Functions inherited from Lucene::Query | |
| 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 | createWeight (const SearcherPtr &searcher) |
| Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries, which re-write to themselves. More... | |
| virtual WeightPtr | weight (const 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 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 SimilarityPtr | getSimilarity (const 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... | |
Public Member Functions inherited from Lucene::LuceneObject | |
| 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 (const LuceneObjectPtr &other) |
| Compare two objects. More... | |
Public Member Functions inherited from Lucene::LuceneSync | |
| 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 NumericRangeQueryPtr | newLongRange (const String &field, int32_t precisionStep, int64_t min, int64_t max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep. More... | |
| static NumericRangeQueryPtr | newLongRange (const String &field, int64_t min, int64_t max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a long range using the default precisionStep NumericUtils#PRECISION_STEP_DEFAULT (4). More... | |
| static NumericRangeQueryPtr | newIntRange (const String &field, int32_t precisionStep, int32_t min, int32_t max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep. More... | |
| static NumericRangeQueryPtr | newIntRange (const String &field, int32_t min, int32_t max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a int range using the default precisionStep NumericUtils#PRECISION_STEP_DEFAULT (4). More... | |
| static NumericRangeQueryPtr | newDoubleRange (const String &field, int32_t precisionStep, double min, double max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep. More... | |
| static NumericRangeQueryPtr | newDoubleRange (const String &field, double min, double max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeFilter, that filters a double range using the default precisionStep NumericUtils#PRECISION_STEP_DEFAULT (4). More... | |
| static NumericRangeQueryPtr | newNumericRange (const String &field, int32_t precisionStep, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive) |
| Factory that creates a NumericRangeQuery, that queries a int, long or double range using the given precisionStep. You can have half-open ranges (which are in fact <= or >= queries) by setting the min or max value to VariantUtils::null(). By setting inclusive to false it will match all documents excluding the bounds, with inclusive on the boundaries are hits, too. More... | |
| static NumericRangeQueryPtr | newNumericRange (const String &field, NumericValue |