Lucene++ - a full-featured, c++ search engine
API Documentation
Obtains byte field values from the FieldCache
using getBytes() and makes those values available as other numeric types, casting as needed.
More...
#include <ByteFieldSource.h>
Public Member Functions | |
ByteFieldSource (const String &field, const ByteParserPtr &parser=ByteParserPtr()) | |
Create a cached byte field source with a specific string-to-byte parser. | |
virtual | ~ByteFieldSource () |
virtual String | getClassName () |
boost::shared_ptr< ByteFieldSource > | shared_from_this () |
virtual String | description () |
Description of field, used in explain() | |
virtual DocValuesPtr | getCachedFieldValues (const FieldCachePtr &cache, const String &field, const IndexReaderPtr &reader) |
Return cached DocValues for input field and reader. | |
virtual bool | cachedFieldSourceEquals (const FieldCacheSourcePtr &other) |
Check if equals to another FieldCacheSource , already knowing that cache and field are equal. | |
virtual int32_t | cachedFieldSourceHashCode () |
Return a hash code of a FieldCacheSource , without the hash-codes of the field and the cache (those are taken care of elsewhere). | |
![]() | |
FieldCacheSource (const String &field) | |
Create a cached field source for the input field. | |
virtual | ~FieldCacheSource () |
boost::shared_ptr< FieldCacheSource > | shared_from_this () |
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 () |
![]() | |
static String | _getClassName () |
Protected Attributes | |
ByteParserPtr | parser |
![]() | |
String | field |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
Obtains byte field values from the FieldCache
using getBytes() and makes those values available as other numeric types, casting as needed.
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. Alternatively, for a short-term fix, you could wrap your ValueSource using MultiValueSource
, which costs more CPU per lookup but will not consume double the FieldCache RAM.
Lucene::ByteFieldSource::ByteFieldSource | ( | const String & | field, |
const ByteParserPtr & | parser = ByteParserPtr() |
||
) |
Create a cached byte field source with a specific string-to-byte parser.
|
virtual |
|
inlinestatic |
|
virtual |
Check if equals to another FieldCacheSource
, already knowing that cache and field are equal.
Implements Lucene::FieldCacheSource.
|
virtual |
Return a hash code of a FieldCacheSource
, without the hash-codes of the field and the cache (those are taken care of elsewhere).
Implements Lucene::FieldCacheSource.
|
virtual |
Description of field, used in explain()
Reimplemented from Lucene::FieldCacheSource.
|
virtual |
Return cached DocValues for input field and reader.
cache | FieldCache so that values of a field are loaded once per reader (RAM allowing) |
field | Field for which values are required. |
Implements Lucene::FieldCacheSource.
|
inlinevirtual |
Reimplemented from Lucene::FieldCacheSource.
|
inline |
|
protected |