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

Loading...
Searching...
No Matches
SegmentTermDocs.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 SEGMENTTERMDOCS_H
8#define SEGMENTTERMDOCS_H
9
10#include "TermPositions.h"
11
12 namespace Lucene {
13
14 class LPPAPI 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 SegmentReader* __parent;
24 IndexInputPtr _freqStream;
25 IndexInput* __freqStream;
26 int32_t count;
27 int32_t df;
28 BitVectorPtr deletedDocs;
29 BitVector* __deletedDocs;
30 int32_t _doc;
31 int32_t _freq;
32
33 int32_t skipInterval;
34 int32_t maxSkipLevels;
35 DefaultSkipListReaderPtr skipListReader;
36
37 int64_t freqBasePointer;
38 int64_t proxBasePointer;
39
40 int64_t skipPointer;
41 bool haveSkipped;
42
43 bool currentFieldStoresPayloads;
44 bool currentFieldOmitTermFreqAndPositions;
45
46 public:
48 virtual void seek(const TermPtr& term);
49
51 virtual void seek(const TermEnumPtr& termEnum);
52
53 virtual void seek(const TermInfoPtr& ti, const TermPtr& term);
54
55 virtual void close();
56
58 virtual int32_t doc();
59
61 virtual int32_t freq();
62
64 virtual bool next();
65
67 virtual int32_t read(Collection<int32_t>& docs, Collection<int32_t>& freqs);
68
70 virtual bool skipTo(int32_t target);
71
73 virtual IndexInputPtr freqStream();
74 virtual void freqStream(const IndexInputPtr& freqStream);
75
76 protected:
77 virtual void skippingDoc();
78 virtual int32_t readNoTf(Collection<int32_t>& docs, Collection<int32_t>& freqs, int32_t length);
79
81 virtual void skipProx(int64_t proxPointer, int32_t payloadLength);
82};
83
84}
85
86#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TermPositions.h
Lucene::BitVector
Optimized implementation of a vector of bits.
Definition BitVector.h:15
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::IndexInput
Abstract base class for input from a file in a Directory. A random-access input stream....
Definition IndexInput.h:17
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene::SegmentReader
Definition SegmentReader.h:15
Lucene::SegmentTermDocs::_freq
int32_t _freq
Definition SegmentTermDocs.h:31
Lucene::SegmentTermDocs::~SegmentTermDocs
virtual ~SegmentTermDocs()
Lucene::SegmentTermDocs::skipListReader
DefaultSkipListReaderPtr skipListReader
Definition SegmentTermDocs.h:35
Lucene::SegmentTermDocs::freqStream
virtual void freqStream(const IndexInputPtr &freqStream)
Lucene::SegmentTermDocs::next
virtual bool next()
Moves to the next pair in the enumeration.
Lucene::SegmentTermDocs::skipInterval
int32_t skipInterval
Definition SegmentTermDocs.h:33
Lucene::SegmentTermDocs::skipTo
virtual bool skipTo(int32_t target)
Optimized implementation.
Lucene::SegmentTermDocs::seek
virtual void seek(const TermPtr &term)
Sets this to the data for a term.
Lucene::SegmentTermDocs::readNoTf
virtual int32_t readNoTf(Collection< int32_t > &docs, Collection< int32_t > &freqs, int32_t length)
Lucene::SegmentTermDocs::currentFieldStoresPayloads
bool currentFieldStoresPayloads
Definition SegmentTermDocs.h:43
Lucene::SegmentTermDocs::freq
virtual int32_t freq()
Returns the frequency of the term within the current document.
Lucene::SegmentTermDocs::SegmentTermDocs
SegmentTermDocs(const SegmentReaderPtr &parent)
Lucene::SegmentTermDocs::df
int32_t df
Definition SegmentTermDocs.h:27
Lucene::SegmentTermDocs::freqBasePointer
int64_t freqBasePointer
Definition SegmentTermDocs.h:37
Lucene::SegmentTermDocs::_doc
int32_t _doc
Definition SegmentTermDocs.h:30
Lucene::SegmentTermDocs::proxBasePointer
int64_t proxBasePointer
Definition SegmentTermDocs.h:38
Lucene::SegmentTermDocs::seek
virtual void seek(const TermInfoPtr &ti, const TermPtr &term)
Lucene::SegmentTermDocs::count
int32_t count
Definition SegmentTermDocs.h:26
Lucene::SegmentTermDocs::haveSkipped
bool haveSkipped
Definition SegmentTermDocs.h:41
Lucene::SegmentTermDocs::__freqStream
IndexInput * __freqStream
Definition SegmentTermDocs.h:25
Lucene::SegmentTermDocs::currentFieldOmitTermFreqAndPositions
bool currentFieldOmitTermFreqAndPositions
Definition SegmentTermDocs.h:44
Lucene::SegmentTermDocs::__deletedDocs
BitVector * __deletedDocs
Definition SegmentTermDocs.h:29
Lucene::SegmentTermDocs::doc
virtual int32_t doc()
Returns the current document number.
Lucene::SegmentTermDocs::_freqStream
IndexInputPtr _freqStream
Definition SegmentTermDocs.h:24
Lucene::SegmentTermDocs::deletedDocs
BitVectorPtr deletedDocs
Definition SegmentTermDocs.h:28
Lucene::SegmentTermDocs::read
virtual int32_t read(Collection< int32_t > &docs, Collection< int32_t > &freqs)
Optimized implementation.
Lucene::SegmentTermDocs::close
virtual void close()
Frees associated resources.
Lucene::SegmentTermDocs::skipProx
virtual void skipProx(int64_t proxPointer, int32_t payloadLength)
Overridden by SegmentTermPositions to skip in prox stream.
Lucene::SegmentTermDocs::_parent
SegmentReaderWeakPtr _parent
Definition SegmentTermDocs.h:22
Lucene::SegmentTermDocs::freqStream
virtual IndexInputPtr freqStream()
Used for testing.
Lucene::SegmentTermDocs::seek
virtual void seek(const TermEnumPtr &termEnum)
Sets this to the data for the current term in a TermEnum.
Lucene::SegmentTermDocs::skippingDoc
virtual void skippingDoc()
Lucene::SegmentTermDocs::__parent
SegmentReader * __parent
Definition SegmentTermDocs.h:23
Lucene::SegmentTermDocs::maxSkipLevels
int32_t maxSkipLevels
Definition SegmentTermDocs.h:34
Lucene::SegmentTermDocs::skipPointer
int64_t skipPointer
Definition SegmentTermDocs.h:40
Lucene::TermPositions::TermPositions
TermPositions()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::TermEnumPtr
boost::shared_ptr< TermEnum > TermEnumPtr
Definition LuceneTypes.h:235
Lucene::SegmentReaderWeakPtr
boost::weak_ptr< SegmentReader > SegmentReaderWeakPtr
Definition LuceneTypes.h:215
Lucene::IndexInputPtr
boost::shared_ptr< IndexInput > IndexInputPtr
Definition LuceneTypes.h:493
Lucene::BitVectorPtr
boost::shared_ptr< BitVector > BitVectorPtr
Definition LuceneTypes.h:523
Lucene::TermInfoPtr
boost::shared_ptr< TermInfo > TermInfoPtr
Definition LuceneTypes.h:239
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
Lucene::SegmentReaderPtr
boost::shared_ptr< SegmentReader > SegmentReaderPtr
Definition LuceneTypes.h:215
Lucene::DefaultSkipListReaderPtr
boost::shared_ptr< DefaultSkipListReader > DefaultSkipListReaderPtr
Definition LuceneTypes.h:103

clucene.sourceforge.net