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"
11#include "CachingWrapperFilter.h"
12
13 namespace Lucene {
14
17 class LPPAPI CachingSpanFilter : public SpanFilter {
18 public:
20 CachingSpanFilter(const SpanFilterPtr& filter, CachingWrapperFilter::DeletesMode deletesMode = CachingWrapperFilter::DELETES_RECACHE);
21 virtual ~CachingSpanFilter();
22
23 LUCENE_CLASS(CachingSpanFilter);
24
25 protected:
26 SpanFilterPtr filter;
27 FilterCachePtr cache;
28
29 public:
30 // for testing
31 int32_t hitCount;
32 int32_t missCount;
33
34 public:
35 virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr& reader);
36 virtual SpanFilterResultPtr bitSpans(const IndexReaderPtr& reader);
37
38 virtual String toString();
39 virtual bool equals(const LuceneObjectPtr& other);
40 virtual int32_t hashCode();
41
42 protected:
43 SpanFilterResultPtr getCachedResult(const IndexReaderPtr& reader);
44};
45
46}
47
48#endif
CachingWrapperFilter.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
SpanFilter.h
Lucene::CachingSpanFilter
Wraps another SpanFilter's result and caches it. The purpose is to allow filters to simply filter,...
Definition CachingSpanFilter.h:17
Lucene::CachingSpanFilter::getCachedResult
SpanFilterResultPtr getCachedResult(const IndexReaderPtr &reader)
Lucene::CachingSpanFilter::~CachingSpanFilter
virtual ~CachingSpanFilter()
Lucene::CachingSpanFilter::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::CachingSpanFilter::bitSpans
virtual SpanFilterResultPtr bitSpans(const IndexReaderPtr &reader)
Returns a SpanFilterResult with true for documents which should be permitted in search results,...
Lucene::CachingSpanFilter::toString
virtual String toString()
Returns a string representation of the object.
Lucene::CachingSpanFilter::getDocIdSet
virtual DocIdSetPtr getDocIdSet(const IndexReaderPtr &reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
Lucene::CachingSpanFilter::filter
SpanFilterPtr filter
Definition CachingSpanFilter.h:26
Lucene::CachingSpanFilter::cache
FilterCachePtr cache
Definition CachingSpanFilter.h:27
Lucene::CachingSpanFilter::CachingSpanFilter
CachingSpanFilter(const SpanFilterPtr &filter, CachingWrapperFilter::DeletesMode deletesMode=CachingWrapperFilter::DELETES_RECACHE)
New deletions always result in a cache miss, by default (CachingWrapperFilter#RECACHE.
Lucene::CachingSpanFilter::hitCount
int32_t hitCount
Definition CachingSpanFilter.h:31
Lucene::CachingSpanFilter::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::CachingSpanFilter::missCount
int32_t missCount
Definition CachingSpanFilter.h:32
Lucene::CachingWrapperFilter::DeletesMode
DeletesMode
Specifies how new deletions against a reopened reader should be handled.
Definition CachingWrapperFilter.h:30
Lucene::SpanFilter
Abstract base class providing a mechanism to restrict searches to a subset of an index and also maint...
Definition SpanFilter.h:21
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::DocIdSetPtr
boost::shared_ptr< DocIdSet > DocIdSetPtr
Definition LuceneTypes.h:323
Lucene::SpanFilterPtr
boost::shared_ptr< SpanFilter > SpanFilterPtr
Definition LuceneTypes.h:444
Lucene::FilterCachePtr
boost::shared_ptr< FilterCache > FilterCachePtr
Definition LuceneTypes.h:359
Lucene::SpanFilterResultPtr
boost::shared_ptr< SpanFilterResult > SpanFilterResultPtr
Definition LuceneTypes.h:445
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net