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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
19 LUCENE_CLASS(SegmentTermDocs);
20
21 protected:
22 SegmentReaderWeakPtr _parent;
23 IndexInputPtr _freqStream;
24 int32_t count;
25 int32_t df;
26 BitVectorPtr deletedDocs;
27 int32_t _doc;
28 int32_t _freq;
29
30 int32_t skipInterval;
31 int32_t maxSkipLevels;
32 DefaultSkipListReaderPtr skipListReader;
33
34 int64_t freqBasePointer;
35 int64_t proxBasePointer;
36
37 int64_t skipPointer;
38 bool haveSkipped;
39
40 bool currentFieldStoresPayloads;
41 bool currentFieldOmitTermFreqAndPositions;
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
Lucene::SegmentTermDocs::doc
virtual int32_t doc()
Returns the current document number.
Lucene::SegmentReaderWeakPtr
boost::weak_ptr< SegmentReader > SegmentReaderWeakPtr
Definition: LuceneTypes.h:215
Lucene::SegmentTermDocs::freqBasePointer
int64_t freqBasePointer
Definition: SegmentTermDocs.h:34
Lucene::DefaultSkipListReaderPtr
boost::shared_ptr< DefaultSkipListReader > DefaultSkipListReaderPtr
Definition: LuceneTypes.h:103
Lucene::SegmentTermDocs::SegmentTermDocs
SegmentTermDocs(const SegmentReaderPtr &parent)
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::SegmentTermDocs::skipTo
virtual bool skipTo(int32_t target)
Optimized implementation.
Lucene::SegmentTermDocs::skipListReader
DefaultSkipListReaderPtr skipListReader
Definition: SegmentTermDocs.h:32
Lucene::TermEnumPtr
boost::shared_ptr< TermEnum > TermEnumPtr
Definition: LuceneTypes.h:235
Lucene::SegmentTermDocs::seek
virtual void seek(const TermPtr &term)
Sets this to the data for a term.
Lucene::SegmentTermDocs::_freq
int32_t _freq
Definition: SegmentTermDocs.h:28
Lucene::SegmentTermDocs::haveSkipped
bool haveSkipped
Definition: SegmentTermDocs.h:38
Lucene::SegmentTermDocs::skipProx
virtual void skipProx(int64_t proxPointer, int32_t payloadLength)
Overridden by SegmentTermPositions to skip in prox stream.
Lucene::SegmentTermDocs::freq
virtual int32_t freq()
Returns the frequency of the term within the current document.
Lucene::SegmentTermDocs::skippingDoc
virtual void skippingDoc()
Lucene::SegmentTermDocs::df
int32_t df
Definition: SegmentTermDocs.h:25
Lucene::SegmentTermDocs::currentFieldOmitTermFreqAndPositions
bool currentFieldOmitTermFreqAndPositions
Definition: SegmentTermDocs.h:41
Lucene::SegmentTermDocs::next
virtual bool next()
Moves to the next pair in the enumeration.
Lucene::BitVectorPtr
boost::shared_ptr< BitVector > BitVectorPtr
Definition: LuceneTypes.h:523
Lucene::SegmentTermDocs::deletedDocs
BitVectorPtr deletedDocs
Definition: SegmentTermDocs.h:26
Lucene::TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition: TermPositions.h:18
TermPositions.h
Lucene::SegmentTermDocs::skipInterval
int32_t skipInterval
Definition: SegmentTermDocs.h:30
Lucene::SegmentTermDocs::~SegmentTermDocs
virtual ~SegmentTermDocs()
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::IndexInputPtr
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
Lucene::SegmentTermDocs::_parent
SegmentReaderWeakPtr _parent
Definition: SegmentTermDocs.h:19
Lucene::SegmentTermDocs::freqStream
virtual IndexInputPtr freqStream()
Used for testing.
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::SegmentTermDocs::currentFieldStoresPayloads
bool currentFieldStoresPayloads
Definition: SegmentTermDocs.h:40
Lucene::SegmentTermDocs::maxSkipLevels
int32_t maxSkipLevels
Definition: SegmentTermDocs.h:31
Lucene::SegmentReaderPtr
boost::shared_ptr< SegmentReader > SegmentReaderPtr
Definition: LuceneTypes.h:215
Lucene::SegmentTermDocs::readNoTf
virtual int32_t readNoTf(Collection< int32_t > docs, Collection< int32_t > freqs, int32_t length)
Lucene::SegmentTermDocs::proxBasePointer
int64_t proxBasePointer
Definition: SegmentTermDocs.h:35
Lucene::SegmentTermDocs::skipPointer
int64_t skipPointer
Definition: SegmentTermDocs.h:37
Lucene::Collection< int32_t >
Lucene::SegmentTermDocs::_doc
int32_t _doc
Definition: SegmentTermDocs.h:27
Lucene::SegmentTermDocs::_freqStream
IndexInputPtr _freqStream
Definition: SegmentTermDocs.h:23
Lucene::SegmentTermDocs::close
virtual void close()
Frees associated resources.
Lucene::TermInfoPtr
boost::shared_ptr< TermInfo > TermInfoPtr
Definition: LuceneTypes.h:239
Lucene::SegmentTermDocs
Definition: SegmentTermDocs.h:14
Lucene::SegmentTermDocs::count
int32_t count
Definition: SegmentTermDocs.h:24
Lucene::SegmentTermDocs::read
virtual int32_t read(Collection< int32_t > docs, Collection< int32_t > freqs)
Optimized implementation.

clucene.sourceforge.net