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
FilterIndexReader.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 FILTERINDEXREADER_H
8 #define FILTERINDEXREADER_H
9
10 #include "IndexReader.h"
11 #include "TermPositions.h"
12 #include "TermEnum.h"
13
14 namespace Lucene
15 {
21 class LPPAPI FilterIndexReader : public IndexReader
22 {
23 public:
29 FilterIndexReader(IndexReaderPtr in);
30
31 virtual ~FilterIndexReader();
32
33 LUCENE_CLASS(FilterIndexReader);
34
35 protected:
36 IndexReaderPtr in;
37
38 public:
39 virtual DirectoryPtr directory();
40 virtual Collection<TermFreqVectorPtr> getTermFreqVectors(int32_t docNumber);
41 virtual TermFreqVectorPtr getTermFreqVector(int32_t docNumber, const String& field);
42 virtual void getTermFreqVector(int32_t docNumber, const String& field, TermVectorMapperPtr mapper);
43 virtual void getTermFreqVector(int32_t docNumber, TermVectorMapperPtr mapper);
44 virtual int32_t numDocs();
45 virtual int32_t maxDoc();
46 virtual DocumentPtr document(int32_t n, FieldSelectorPtr fieldSelector);
47 virtual bool isDeleted(int32_t n);
48 virtual bool hasDeletions();
49 virtual bool hasNorms(const String& field);
50 virtual ByteArray norms(const String& field);
51 virtual void norms(const String& field, ByteArray norms, int32_t offset);
52 virtual TermEnumPtr terms();
53 virtual TermEnumPtr terms(TermPtr t);
54 virtual int32_t docFreq(TermPtr t);
55 virtual TermDocsPtr termDocs();
56 virtual TermDocsPtr termDocs(TermPtr term);
57 virtual TermPositionsPtr termPositions();
58 virtual HashSet<String> getFieldNames(FieldOption fieldOption);
59 virtual int64_t getVersion();
60 virtual bool isCurrent();
61 virtual bool isOptimized();
62 virtual Collection<IndexReaderPtr> getSequentialSubReaders();
63
66 virtual LuceneObjectPtr getFieldCacheKey();
67
70 virtual LuceneObjectPtr getDeletesCacheKey();
71
72 protected:
73 virtual void doUndeleteAll();
74 virtual void doSetNorm(int32_t doc, const String& field, uint8_t value);
75 virtual void doDelete(int32_t docNum);
76 virtual void doCommit(MapStringString commitUserData);
77 virtual void doClose();
78 };
79
81 class LPPAPI FilterTermDocs : public TermPositions, public LuceneObject
82 {
83 public:
84 FilterTermDocs(TermDocsPtr in);
85 virtual ~FilterTermDocs();
86
87 LUCENE_CLASS(FilterTermDocs);
88
89 protected:
90 TermDocsPtr in;
91
92 public:
93 virtual void seek(TermPtr term);
94 virtual void seek(TermEnumPtr termEnum);
95 virtual int32_t doc();
96 virtual int32_t freq();
97 virtual bool next();
98 virtual int32_t read(Collection<int32_t> docs, Collection<int32_t> freqs);
99 virtual bool skipTo(int32_t target);
100 virtual void close();
101 };
102
104 class LPPAPI FilterTermPositions : public FilterTermDocs
105 {
106 public:
107 FilterTermPositions(TermPositionsPtr in);
108 virtual ~FilterTermPositions();
109
110 LUCENE_CLASS(FilterTermPositions);
111
112 public:
113 virtual int32_t nextPosition();
114 virtual int32_t getPayloadLength();
115 virtual ByteArray getPayload(ByteArray data, int32_t offset);
116 virtual bool isPayloadAvailable();
117 };
118
120 class LPPAPI FilterTermEnum : public TermEnum
121 {
122 public:
123 FilterTermEnum(TermEnumPtr in);
124 virtual ~FilterTermEnum();
125
126 LUCENE_CLASS(FilterTermEnum);
127
128 protected:
129 TermEnumPtr in;
130
131 public:
132 virtual bool next();
133 virtual TermPtr term();
134 virtual int32_t docFreq();
135 virtual void close();
136 };
137 }
138
139 #endif

clucene.sourceforge.net