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


SegmentTermDocs.h
Go to the documentation of this file.
1 // 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 SEGMENTTERMDOCS_H
8 #define SEGMENTTERMDOCS_H
9 
10 #include "TermPositions.h"
11 
12 namespace Lucene {
13 
14 class SegmentTermDocs : public TermPositions, public LuceneObject {
15 public:
16  SegmentTermDocs(const SegmentReaderPtr& parent);
17  virtual ~SegmentTermDocs();
18 
20 
21 protected:
24  int32_t count;
25  int32_t df;
27  int32_t _doc;
28  int32_t _freq;
29 
30  int32_t skipInterval;
31  int32_t maxSkipLevels;
33 
34  int64_t freqBasePointer;
35  int64_t proxBasePointer;
36 
37  int64_t skipPointer;
39 
42 
43 public:
45  virtual void seek(const TermPtr& term);
46 
48  virtual void seek(const TermEnumPtr& termEnum);
49 
50  virtual void seek(const TermInfoPtr& ti, const TermPtr& term);
51 
52  virtual void close();
53 
55  virtual int32_t doc();
56 
58  virtual int32_t freq();
59 
61  virtual bool next();
62 
64  virtual int32_t read(Collection<int32_t> docs, Collection<int32_t> freqs);
65 
67  virtual bool skipTo(int32_t target);
68 
70  virtual IndexInputPtr freqStream();
71  virtual void freqStream(const IndexInputPtr& freqStream);
72 
73 protected:
74  virtual void skippingDoc();
75  virtual int32_t readNoTf(Collection<int32_t> docs, Collection<int32_t> freqs, int32_t length);
76 
78  virtual void skipProx(int64_t proxPointer, int32_t payloadLength);
79 };
80 
81 }
82 
83 #endif
virtual int32_t doc()
Returns the current document number.
boost::weak_ptr< SegmentReader > SegmentReaderWeakPtr
Definition: LuceneTypes.h:215
int64_t freqBasePointer
Definition: SegmentTermDocs.h:34
boost::shared_ptr< DefaultSkipListReader > DefaultSkipListReaderPtr
Definition: LuceneTypes.h:103
SegmentTermDocs(const SegmentReaderPtr &parent)
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
virtual bool skipTo(int32_t target)
Optimized implementation.
DefaultSkipListReaderPtr skipListReader
Definition: SegmentTermDocs.h:32
boost::shared_ptr< TermEnum > TermEnumPtr
Definition: LuceneTypes.h:235
virtual void seek(const TermPtr &term)
Sets this to the data for a term.
int32_t _freq
Definition: SegmentTermDocs.h:28
bool haveSkipped
Definition: SegmentTermDocs.h:38
virtual void skipProx(int64_t proxPointer, int32_t payloadLength)
Overridden by SegmentTermPositions to skip in prox stream.
virtual int32_t freq()
Returns the frequency of the term within the current document.
virtual void skippingDoc()
int32_t df
Definition: SegmentTermDocs.h:25
bool currentFieldOmitTermFreqAndPositions
Definition: SegmentTermDocs.h:41
virtual bool next()
Moves to the next pair in the enumeration.
boost::shared_ptr< BitVector > BitVectorPtr
Definition: LuceneTypes.h:523
BitVectorPtr deletedDocs
Definition: SegmentTermDocs.h:26
TermPositions provides an interface for enumerating the *> tuples for...
Definition: TermPositions.h:18
int32_t skipInterval
Definition: SegmentTermDocs.h:30
Base class for all Lucene classes.
Definition: LuceneObject.h:31
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
SegmentReaderWeakPtr _parent
Definition: SegmentTermDocs.h:19
virtual IndexInputPtr freqStream()
Used for testing.
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
bool currentFieldStoresPayloads
Definition: SegmentTermDocs.h:40
int32_t maxSkipLevels
Definition: SegmentTermDocs.h:31
boost::shared_ptr< SegmentReader > SegmentReaderPtr
Definition: LuceneTypes.h:215
virtual int32_t readNoTf(Collection< int32_t > docs, Collection< int32_t > freqs, int32_t length)
int64_t proxBasePointer
Definition: SegmentTermDocs.h:35
int64_t skipPointer
Definition: SegmentTermDocs.h:37
int32_t _doc
Definition: SegmentTermDocs.h:27
IndexInputPtr _freqStream
Definition: SegmentTermDocs.h:23
virtual void close()
Frees associated resources.
boost::shared_ptr< TermInfo > TermInfoPtr
Definition: LuceneTypes.h:239
Definition: SegmentTermDocs.h:14
int32_t count
Definition: SegmentTermDocs.h:24
virtual int32_t read(Collection< int32_t > docs, Collection< int32_t > freqs)
Optimized implementation.

clucene.sourceforge.net