Lucene++ - a full-featured, c++ search engine
API Documentation
Obtains the ordinal of the field value from the default Lucene FieldCache
using getStringIndex() and reverses the order.
More...
#include <ReverseOrdFieldSource.h>
Public Member Functions | |
ReverseOrdFieldSource (const String &field) | |
Constructor for a certain field. | |
virtual | ~ReverseOrdFieldSource () |
virtual String | getClassName () |
boost::shared_ptr< ReverseOrdFieldSource > | shared_from_this () |
virtual String | description () |
Description of field, used in explain() | |
virtual DocValuesPtr | getValues (const IndexReaderPtr &reader) |
Return the DocValues used by the function query. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Needed for possible caching of query results - used by ValueSourceQuery#equals(LuceneObjectPtr) . | |
virtual int32_t | hashCode () |
Needed for possible caching of query results - used by ValueSourceQuery#hashCode() . | |
![]() | |
virtual | ~ValueSource () |
boost::shared_ptr< ValueSource > | shared_from_this () |
virtual String | toString () |
Returns a string representation of the object. | |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
Return clone of this object. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Static Public Member Functions | |
static String | _getClassName () |
![]() | |
static String | _getClassName () |
Protected Attributes | |
String | field |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
Obtains the ordinal of the field value from the default Lucene FieldCache
using getStringIndex() and reverses the order.
The native lucene index order is used to assign an ordinal value for each field value.
Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1. Example of reverse ordinal (rord):
If there were only three field values: "apple","banana","pear" then rord("apple")=3, rord("banana")=2, ord("pear")=1
WARNING: rord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.
NOTE: with the switch in 2.9 to segment-based searching, if getValues
is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.
Lucene::ReverseOrdFieldSource::ReverseOrdFieldSource | ( | const String & | field | ) |
Constructor for a certain field.
field | field whose values reverse order is used. |
|
virtual |
|
inlinestatic |
|
virtual |
Description of field, used in explain()
Implements Lucene::ValueSource.
|
virtual |
Needed for possible caching of query results - used by ValueSourceQuery#equals(LuceneObjectPtr)
.
Implements Lucene::ValueSource.
|
inlinevirtual |
Reimplemented from Lucene::ValueSource.
|
virtual |
Return the DocValues used by the function query.
reader | The IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based. |
Implements Lucene::ValueSource.
|
virtual |
Needed for possible caching of query results - used by ValueSourceQuery#hashCode()
.
Implements Lucene::ValueSource.
|
inline |
|
protected |