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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CachingSpanFilter.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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"
11 #include "CachingWrapperFilter.h"
12
13 namespace Lucene
14 {
17 class LPPAPI CachingSpanFilter : public SpanFilter
18 {
19 public:
21 CachingSpanFilter(SpanFilterPtr filter, CachingWrapperFilter::DeletesMode deletesMode = CachingWrapperFilter::DELETES_RECACHE);
22 virtual ~CachingSpanFilter();
23
24 LUCENE_CLASS(CachingSpanFilter);
25
26 protected:
27 SpanFilterPtr filter;
28 FilterCachePtr cache;
29
30 public:
31 // for testing
32 int32_t hitCount;
33 int32_t missCount;
34
35 public:
36 virtual DocIdSetPtr getDocIdSet(IndexReaderPtr reader);
37 virtual SpanFilterResultPtr bitSpans(IndexReaderPtr reader);
38
39 virtual String toString();
40 virtual bool equals(LuceneObjectPtr other);
41 virtual int32_t hashCode();
42
43 protected:
44 SpanFilterResultPtr getCachedResult(IndexReaderPtr reader);
45 };
46 }
47
48 #endif

clucene.sourceforge.net