Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
CachingSpanFilter.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef CACHINGSPANFILTER_H
8#define CACHINGSPANFILTER_H
9
10#include "SpanFilter.h"
12
13namespace Lucene {
14
17class LPPAPI CachingSpanFilter : public SpanFilter {
18public:
20 CachingSpanFilter(const SpanFilterPtr& filter, CachingWrapperFilter::DeletesMode deletesMode = CachingWrapperFilter::DELETES_RECACHE);
22
24
25protected:
28
29public:
30 // for testing
31 int32_t hitCount;
32 int32_t missCount;
33
34public:
35 virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr& reader);
37
38 virtual String toString();
39 virtual bool equals(const LuceneObjectPtr& other);
40 virtual int32_t hashCode();
41
42protected:
44};
45
46}
47
48#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Wraps another SpanFilter's result and caches it. The purpose is to allow filters to simply filter,...
Definition CachingSpanFilter.h:17
SpanFilterResultPtr getCachedResult(const IndexReaderPtr &reader)
virtual int32_t hashCode()
Return hash code for this object.
virtual SpanFilterResultPtr bitSpans(const IndexReaderPtr &reader)
Returns a SpanFilterResult with true for documents which should be permitted in search results,...
virtual String toString()
Returns a string representation of the object.
virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr &reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
SpanFilterPtr filter
Definition CachingSpanFilter.h:26
FilterCachePtr cache
Definition CachingSpanFilter.h:27
CachingSpanFilter(const SpanFilterPtr &filter, CachingWrapperFilter::DeletesMode deletesMode=CachingWrapperFilter::DELETES_RECACHE)
New deletions always result in a cache miss, by default (CachingWrapperFilter#RECACHE.
int32_t hitCount
Definition CachingSpanFilter.h:31
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
int32_t missCount
Definition CachingSpanFilter.h:32
DeletesMode
Specifies how new deletions against a reopened reader should be handled.
Definition CachingWrapperFilter.h:30
Abstract base class providing a mechanism to restrict searches to a subset of an index and also maint...
Definition SpanFilter.h:21
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< SpanFilter > SpanFilterPtr
Definition LuceneTypes.h:444
boost::shared_ptr< FilterCache > FilterCachePtr
Definition LuceneTypes.h:359
boost::shared_ptr< SpanFilterResult > SpanFilterResultPtr
Definition LuceneTypes.h:445
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net