Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef FIELDCACHEIMPL_H
8 #define FIELDCACHEIMPL_H
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)=0
FieldCacheWeakPtr _wrapper
Definition: FieldCacheImpl.h:77
virtual void setInfoStream(const InfoStreamPtr &stream)
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to Fie...
virtual Collection< double > getDoubles(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
Internal cache.
Definition: FieldCacheImpl.h:72
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
boost::shared_ptr< StringIndex > StringIndexPtr
Definition: LuceneTypes.h:460
String field
Definition: FieldCacheImpl.h:57
FieldCacheEntryImpl(const LuceneObjectPtr &readerKey, const String &fieldName, int32_t cacheType, const boost::any &custom, const boost::any &value)
virtual String getFieldName()
virtual StringIndexPtr getStringIndex(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found reads the term values in fi...
LuceneObjectPtr readerKey
Definition: FieldCacheImpl.h:165
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
InfoStreamPtr infoStream
Definition: FieldCacheImpl.h:24
boost::any custom
Definition: FieldCacheImpl.h:171
String fieldName
Definition: FieldCacheImpl.h:169
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual int32_t getCacheType()
A unique Identifier/Description for each item in the FieldCache. Can be useful for logging/debugging.
Definition: FieldCache.h:255
DoubleCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual void purge(const IndexReaderPtr &r)
Drops all cache entries associated with this reader. NOTE: this reader must precisely match the reade...
virtual Collection< String > getStrings(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the term values in f...
virtual LuceneObjectPtr getReaderKey()
Definition: FieldCacheImpl.h:127
Maintains caches of term values.
Definition: FieldCache.h:17
int32_t cacheType
Definition: FieldCacheImpl.h:170
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
MapStringCache caches
Definition: FieldCacheImpl.h:20
Entry(const String &field, const boost::any &custom)
Creates one of these objects for a custom comparator/parser.
Definition: FieldCacheImpl.h:138
boost::weak_ptr< FieldCache > FieldCacheWeakPtr
Definition: LuceneTypes.h:334
Definition: AbstractAllTermDocs.h:12
Base class for all Lucene classes.
Definition: LuceneObject.h:31
boost::shared_ptr< DoubleParser > DoubleParserPtr
Definition: LuceneTypes.h:328
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
boost::shared_ptr< LongParser > LongParserPtr
Definition: LuceneTypes.h:378
LongCache(const FieldCachePtr &wrapper=FieldCachePtr())
virtual int32_t hashCode()
Composes a hashcode based on the field and type.
boost::shared_ptr< IntParser > IntParserPtr
Definition: LuceneTypes.h:376
virtual void purge(const IndexReaderPtr &r)
Remove this reader from the cache, if present.
virtual boost::any getCustom()
Definition: FieldCacheImpl.h:116
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual boost::any get(const IndexReaderPtr &reader, const EntryPtr &key)
virtual ~StringIndexCache()
virtual InfoStreamPtr getInfoStream()
virtual bool equals(const LuceneObjectPtr &other)
Two of these are equal if they reference the same field and type.
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual void printNewInsanity(const InfoStreamPtr &infoStream, const boost::any &value)
boost::any custom
Definition: FieldCacheImpl.h:61
Definition: FieldCacheImpl.h:149
IntCache(const FieldCachePtr &wrapper=FieldCachePtr())
Cache(const FieldCachePtr &wrapper=FieldCachePtr())
boost::any value
Definition: FieldCacheImpl.h:172
virtual Collection< FieldCacheEntryPtr > getCacheEntries()
Generates an array of CacheEntry objects representing all items currently in the FieldCache.
boost::shared_ptr< ByteParser > ByteParserPtr
Definition: LuceneTypes.h:289
virtual boost::any getValue()
boost::shared_ptr< FieldCache > FieldCachePtr
Definition: LuceneTypes.h:334
The default cache implementation, storing all values in memory. A WeakHashMap is used for storage.
Definition: FieldCacheImpl.h:15
virtual ~FieldCacheImpl()
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
ByteCache(const FieldCachePtr &wrapper=FieldCachePtr())
Definition: FieldCacheImpl.h:160
virtual ~FieldCacheEntryImpl()
boost::shared_ptr< InfoStream > InfoStreamPtr
Definition: LuceneTypes.h:532
boost::shared_ptr< Entry > EntryPtr
Definition: LuceneTypes.h:331
virtual Collection< int64_t > getLongs(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
WeakMapLuceneObjectMapEntryAny readerCache
Definition: FieldCacheImpl.h:81
virtual boost::any createValue(const IndexReaderPtr &reader, const EntryPtr &key)
virtual Collection< uint8_t > getBytes(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
virtual void purgeAllCaches()
Instructs the FieldCache to forcibly expunge all entries from the underlying caches....
virtual Collection< int32_t > getInts(const IndexReaderPtr &reader, const String &field)
Checks the internal cache for an appropriate entry, and if none are found, reads the terms in field a...
Definition: FieldCacheImpl.h:51
StringIndexCache(const FieldCachePtr &wrapper=FieldCachePtr())
StringCache(const FieldCachePtr &wrapper=FieldCachePtr())
Definition: FieldCacheImpl.h:105
Definition: FieldCacheImpl.h:94
clucene.sourceforge.net