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
SegmentTermPositions.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 SEGMENTTERMPOSITIONS_H
8 #define SEGMENTTERMPOSITIONS_H
9
10 #include "SegmentTermDocs.h"
11
12 namespace Lucene
13 {
14 class SegmentTermPositions : public SegmentTermDocs
15 {
16 public:
17 SegmentTermPositions(SegmentReaderPtr parent);
18 virtual ~SegmentTermPositions();
19
20 LUCENE_CLASS(SegmentTermPositions);
21
22 protected:
23 IndexInputPtr proxStream;
24 int32_t proxCount;
25 int32_t position;
26
28 int32_t payloadLength;
29
31 bool needToLoadPayload;
32
33 // these variables are being used to remember information for a lazy skip
34 int64_t lazySkipPointer;
35 int32_t lazySkipProxCount;
36
37 public:
38 using SegmentTermDocs::seek;
39
40 virtual void seek(TermInfoPtr ti, TermPtr term);
41 virtual void close();
42
44 virtual int32_t nextPosition();
45
47 virtual bool next();
48
50 virtual int32_t read(Collection<int32_t> docs, Collection<int32_t> freqs);
51
53 virtual int32_t getPayloadLength();
54
56 virtual ByteArray getPayload(ByteArray data, int32_t offset);
57
59 virtual bool isPayloadAvailable();
60
61 protected:
62 int32_t readDeltaPosition();
63
64 virtual void skippingDoc();
65
66 virtual void skipProx(int64_t proxPointer, int32_t payloadLength);
67 virtual void skipPositions(int32_t n);
68 virtual void skipPayload();
69
76 virtual void lazySkip();
77 };
78 }
79
80 #endif

clucene.sourceforge.net