CLucene - a full-featured, c++ search engine
API Documentation
#include <CachingWrapperFilter.h>
Public Member Functions | |
virtual | ~AbstractCachingFilter () |
lucene::util::BitSet * | bits (lucene::index::IndexReader *reader) |
Returns a BitSet with true for documents which should be permitted in search results, and false for those that should not. | |
virtual Filter * | clone () const =0 |
virtual TCHAR * | toString ()=0 |
bool | shouldDeleteBitSet (const lucene::util::BitSet *bits) const |
Because of the problem of cached bitsets with the CachingWrapperFilter, CLucene has no way of knowing whether to delete the bitset returned from bits(). | |
Protected Member Functions | |
AbstractCachingFilter (const AbstractCachingFilter ©) | |
virtual lucene::util::BitSet * | doBits (lucene::index::IndexReader *reader)=0 |
virtual bool | doShouldDeleteBitSet (lucene::util::BitSet *bits) |
AbstractCachingFilter () |
The purpose is to allow filters to implement this and allow itself to be cached. Alternatively, use the CachingWrapperFilter to cache the filter.
lucene::search::AbstractCachingFilter::AbstractCachingFilter | ( | const AbstractCachingFilter & | copy | ) | [protected] |
lucene::search::AbstractCachingFilter::AbstractCachingFilter | ( | ) | [protected] |
virtual lucene::search::AbstractCachingFilter::~AbstractCachingFilter | ( | ) | [virtual] |
virtual lucene:: util ::BitSet* lucene::search::AbstractCachingFilter::doBits | ( | lucene::index::IndexReader * | reader | ) | [protected, pure virtual] |
Implemented in lucene::search::CachingWrapperFilter.
virtual bool lucene::search::AbstractCachingFilter::doShouldDeleteBitSet | ( | lucene::util::BitSet * | bits | ) | [inline, protected, virtual] |
Reimplemented in lucene::search::CachingWrapperFilter.
lucene:: util ::BitSet* lucene::search::AbstractCachingFilter::bits | ( | lucene::index::IndexReader * | reader | ) | [virtual] |
Returns a BitSet with true for documents which should be permitted in search results, and false for those that should not.
Implements lucene::search::Filter.
virtual Filter* lucene::search::AbstractCachingFilter::clone | ( | ) | const [pure virtual] |
virtual TCHAR* lucene::search::AbstractCachingFilter::toString | ( | ) | [pure virtual] |
bool lucene::search::AbstractCachingFilter::shouldDeleteBitSet | ( | const lucene::util::BitSet * | bs | ) | const [inline, virtual] |
Because of the problem of cached bitsets with the CachingWrapperFilter, CLucene has no way of knowing whether to delete the bitset returned from bits().
To properly clean memory from bits(), pass the bitset to this function. The Filter should be deleted if this function returns true.
Reimplemented from lucene::search::Filter.