Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef FIELDCACHESANITYCHECKER_H
8 #define FIELDCACHESANITYCHECKER_H
79 SetReaderField valMismatchKeys);
virtual ~FieldCacheSanityChecker()
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Simple container for a collection of related CacheEntry objects that in conjunction with each other r...
Definition: FieldCacheSanityChecker.h:95
Utility template class to handle collections that can be safely copied and shared.
Definition: Collection.h:17
FieldCacheSanityChecker::InsanityType getType()
Type of insane behavior this object represents.
boost::shared_ptr< FieldCacheEntry > FieldCacheEntryPtr
Definition: LuceneTypes.h:336
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
@ SUBREADER
Indicates an overlap in cache usage on a given field in sub/super readers.
Definition: FieldCacheSanityChecker.h:43
Collection< InsanityPtr > checkValueMismatch(MapSetIntFieldCacheEntry valIdToItems, MapSetReaderFieldInt readerFieldToValIds, SetReaderField valMismatchKeys)
Internal helper method used by check that iterates over valMismatchKeys and generates a Collection of...
MapOfSets< ReaderFieldPtr, luceneHash< ReaderFieldPtr >, luceneEquals< ReaderFieldPtr >, int32_t, boost::hash< int32_t >, std::equal_to< int32_t > > MapSetReaderFieldInt
Definition: FieldCacheSanityChecker.h:37
Collection< FieldCacheEntryPtr > getCacheEntries()
CacheEntry objects which suggest a problem.
InsanityType
An Enumeration of the different types of "insane" behaviour that may be detected in a FieldCache.
Definition: FieldCacheSanityChecker.h:41
virtual String toString()
Multi-Line representation of this Insanity object, starting with the Type and Msg,...
Collection< LuceneObjectPtr > getAllDecendentReaderKeys(const LuceneObjectPtr &seed)
Checks if the seed is an IndexReader, and if so will walk the hierarchy of subReaders building up a l...
Collection< FieldCacheEntryPtr > entries
Definition: FieldCacheSanityChecker.h:105
String getMsg()
Description of the insane behaviour.
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< ReaderField > ReaderFieldPtr
Definition: LuceneTypes.h:548
Base class for all Lucene classes.
Definition: LuceneObject.h:31
String msg
Definition: FieldCacheSanityChecker.h:104
FieldCacheSanityChecker::InsanityType type
Definition: FieldCacheSanityChecker.h:100
Helper class for keeping Lists of Objects associated with keys.
Definition: MapOfSets.h:16
static Collection< InsanityPtr > checkSanity(const FieldCachePtr &cache)
Quick and dirty convenience method.
Provides methods for sanity checking that entries in the FieldCache are not wasteful or inconsistent.
Definition: FieldCacheSanityChecker.h:28
MapOfSets< ReaderFieldPtr, luceneHash< ReaderFieldPtr >, luceneEquals< ReaderFieldPtr >, ReaderFieldPtr, luceneHash< ReaderFieldPtr >, luceneEquals< ReaderFieldPtr > > MapSetReaderFieldReaderField
Definition: FieldCacheSanityChecker.h:38
Insanity(FieldCacheSanityChecker::InsanityType type, const String &msg, Collection< FieldCacheEntryPtr > entries)
boost::shared_ptr< FieldCache > FieldCachePtr
Definition: LuceneTypes.h:334
FieldCacheSanityChecker()
@ VALUEMISMATCH
Indicates entries have the same reader+fieldname but different cached values. This can happen if diff...
Definition: FieldCacheSanityChecker.h:53
MapOfSets< int32_t, boost::hash< int32_t >, std::equal_to< int32_t >, FieldCacheEntryPtr, luceneHash< FieldCacheEntryPtr >, luceneEquals< FieldCacheEntryPtr > > MapSetIntFieldCacheEntry
Definition: FieldCacheSanityChecker.h:33
Collection< InsanityPtr > checkSubreaders(MapSetIntFieldCacheEntry valIdToItems, MapSetReaderFieldInt readerFieldToValIds)
Internal helper method used by check that iterates over the keys of readerFieldToValIds and generates...
static Collection< InsanityPtr > checkSanity(Collection< FieldCacheEntryPtr > cacheEntries)
Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to ...
Collection< InsanityPtr > check(Collection< FieldCacheEntryPtr > cacheEntries)
Tests a CacheEntry[] for indication of "insane" cache usage. NOTE: FieldCache CreationPlaceholder obj...
clucene.sourceforge.net