7#ifndef CACHINGWRAPPERFILTER_H
8#define CACHINGWRAPPERFILTER_H
30 enum DeletesMode { DELETES_IGNORE, DELETES_RECACHE, DELETES_DYNAMIC };
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Wraps another filter's result and caches it. The purpose is to allow filters to simply filter,...
Definition CachingWrapperFilter.h:16
int32_t missCount
Definition CachingWrapperFilter.h:47
virtual int32_t hashCode()
Return hash code for this object.
FilterCachePtr cache
A Filter cache.
Definition CachingWrapperFilter.h:51
virtual ~CachingWrapperFilter()
virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr &reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
DocIdSetPtr docIdSetToCache(const DocIdSetPtr &docIdSet, const IndexReaderPtr &reader)
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.
DeletesMode
Specifies how new deletions against a reopened reader should be handled.
Definition CachingWrapperFilter.h:30
virtual String toString()
Returns a string representation of the object.
CachingWrapperFilter(const FilterPtr &filter, DeletesMode deletesMode=DELETES_IGNORE)
New deletes are ignored by default, which gives higher cache hit rate on reopened readers....
int32_t hitCount
Definition CachingWrapperFilter.h:46
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Abstract base class for restricting which documents may be returned during searching.
Definition Filter.h:15
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
boost::shared_ptr< DocIdSet > DocIdSetPtr
Definition LuceneTypes.h:323
boost::shared_ptr< FilterCache > FilterCachePtr
Definition LuceneTypes.h:359
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
boost::shared_ptr< Filter > FilterPtr
Definition LuceneTypes.h:358