Lucene++ - a full-featured, c++ search engine
API Documentation
TermDocs provides an interface for enumerating <document, frequency>; pairs for a term. The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document. The pairs are ordered by document number. More...
#include <TermDocs.h>
Public Member Functions | |
virtual String | getClassName () |
virtual void | seek (const TermPtr &term)=0 |
Sets this to the data for a term. The enumeration is reset to the start of the data for this term. | |
virtual void | seek (const TermEnumPtr &termEnum)=0 |
Sets this to the data for the current term in a TermEnum . This may be optimized in some implementations. | |
virtual int32_t | doc ()=0 |
Returns the current document number. This is invalid until next() is called for the first time. | |
virtual int32_t | freq ()=0 |
Returns the frequency of the term within the current document. This is invalid until next() is called for the first time. | |
virtual bool | next ()=0 |
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration. | |
virtual int32_t | read (Collection< int32_t > &docs, Collection< int32_t > &freqs)=0 |
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. Returns the number of entries read. Zero is only returned when the stream has been exhausted. | |
virtual bool | skipTo (int32_t target)=0 |
Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns true if there is such an entry. | |
virtual void | close ()=0 |
Frees associated resources. | |
Static Public Member Functions | |
static String | _getClassName () |
Protected Member Functions | |
TermDocs () | |
TermDocs provides an interface for enumerating <document, frequency>; pairs for a term. The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document. The pairs are ordered by document number.
|
protected |
|
inlinestatic |
|
pure virtual |
Frees associated resources.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, Lucene::SegmentTermDocs, and Lucene::SegmentTermPositions.
|
pure virtual |
Returns the current document number. This is invalid until next()
is called for the first time.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, and Lucene::SegmentTermDocs.
|
pure virtual |
Returns the frequency of the term within the current document. This is invalid until next()
is called for the first time.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, and Lucene::SegmentTermDocs.
|
inlinevirtual |
|
pure virtual |
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, Lucene::SegmentTermDocs, and Lucene::SegmentTermPositions.
|
pure virtual |
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. Returns the number of entries read. Zero is only returned when the stream has been exhausted.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, Lucene::SegmentTermDocs, and Lucene::SegmentTermPositions.
|
pure virtual |
Sets this to the data for the current term in a TermEnum
. This may be optimized in some implementations.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, Lucene::SegmentTermDocs, and Lucene::SegmentTermPositions.
|
pure virtual |
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, Lucene::SegmentTermDocs, and Lucene::SegmentTermPositions.
|
pure virtual |
Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns true if there is such an entry.
Implemented in Lucene::AbstractAllTermDocs, Lucene::MultiTermDocs, Lucene::FilterTermDocs, Lucene::MultipleTermPositions, and Lucene::SegmentTermDocs.