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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CachingWrapperFilter.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 CACHINGWRAPPERFILTER_H
8 #define CACHINGWRAPPERFILTER_H
9 
10 #include "Filter.h"
11 
12 namespace Lucene {
13 
16 class LPPAPI CachingWrapperFilter : public Filter {
17 public:
30  enum DeletesMode { DELETES_IGNORE, DELETES_RECACHE, DELETES_DYNAMIC };
31 
36  CachingWrapperFilter(const FilterPtr& filter, DeletesMode deletesMode = DELETES_IGNORE);
37 
38  virtual ~CachingWrapperFilter();
39 
41 
42 INTERNAL:
43  FilterPtr filter;
44 
45  // for testing
46  int32_t hitCount;
47  int32_t missCount;
48 
49 protected:
52 
57  DocIdSetPtr docIdSetToCache(const DocIdSetPtr& docIdSet, const IndexReaderPtr& reader);
58 
59 public:
60  virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr& reader);
61 
62  virtual String toString();
63  virtual bool equals(const LuceneObjectPtr& other);
64  virtual int32_t hashCode();
65 };
66 
67 }
68 
69 #endif

clucene.sourceforge.net