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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SegmentTermPositions.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 SEGMENTTERMPOSITIONS_H
8 #define SEGMENTTERMPOSITIONS_H
9 
10 #include "SegmentTermDocs.h"
11 
12 namespace Lucene {
13 
15 public:
17  virtual ~SegmentTermPositions();
18 
20 
21 protected:
23  int32_t proxCount;
24  int32_t position;
25 
27  int32_t payloadLength;
28 
31 
32  // these variables are being used to remember information for a lazy skip
33  int64_t lazySkipPointer;
35 
36 public:
38 
39  virtual void seek(const TermInfoPtr& ti, const TermPtr& term);
40  virtual void close();
41 
43  virtual int32_t nextPosition();
44 
46  virtual bool next();
47 
49  virtual int32_t read(Collection<int32_t> docs, Collection<int32_t> freqs);
50 
52  virtual int32_t getPayloadLength();
53 
55  virtual ByteArray getPayload(ByteArray data, int32_t offset);
56 
58  virtual bool isPayloadAvailable();
59 
60 protected:
61  int32_t readDeltaPosition();
62 
63  virtual void skippingDoc();
64 
65  virtual void skipProx(int64_t proxPointer, int32_t payloadLength);
66  virtual void skipPositions(int32_t n);
67  virtual void skipPayload();
68 
75  virtual void lazySkip();
76 };
77 
78 }
79 
80 #endif

clucene.sourceforge.net