Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef FILTERINDEXREADER_H
8 #define FILTERINDEXREADER_H
49 virtual ByteArray
norms(
const String& field);
50 virtual void norms(
const String& field, ByteArray norms, int32_t offset);
73 virtual void doSetNorm(int32_t doc,
const String& field, uint8_t value);
75 virtual void doCommit(MapStringString commitUserData);
93 virtual int32_t
doc();
112 virtual ByteArray
getPayload(ByteArray data, int32_t offset);
virtual TermPositionsPtr termPositions()
Returns an unpositioned TermPositions enumerator.
Base class for filtering TermDocs implementations.
Definition: FilterIndexReader.h:80
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
virtual DirectoryPtr directory()
Returns the directory associated with this index. The default implementation returns the directory sp...
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Utility template class to handle collections that can be safely copied and shared.
Definition: Collection.h:17
virtual ByteArray getPayload(ByteArray data, int32_t offset)
Returns the payload data at the current term position. This is invalid until nextPosition() is called...
virtual bool isPayloadAvailable()
Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to next...
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
virtual void doCommit(MapStringString commitUserData)
Implements commit.
virtual int32_t numDocs()
Returns the number of documents in this index.
virtual bool isDeleted(int32_t n)
Returns true if document n has been deleted.
virtual DocumentPtr document(int32_t n, const FieldSelectorPtr &fieldSelector)
Get the Document at the n'th position. The FieldSelector may be used to determine what Fields to load...
boost::shared_ptr< TermVectorMapper > TermVectorMapperPtr
Definition: LuceneTypes.h:254
virtual LuceneObjectPtr getDeletesCacheKey()
If the subclass of FilteredIndexReader modifies the deleted docs, you must override this method to pr...
FilterIndexReader(const IndexReaderPtr &in)
Construct a FilterIndexReader based on the specified base reader. Directory locking for delete,...
virtual int32_t docFreq(const TermPtr &t)
Returns the number of documents containing the term t.
virtual int32_t doc()
Returns the current document number. This is invalid until next() is called for the first time.
virtual bool hasNorms(const String &field)
Returns true if there are norms stored for this field.
virtual bool isCurrent()
Check whether any new changes have occurred to the index since this reader was opened.
virtual int32_t nextPosition()
Returns next position in the current document. It is an error to call this more than freq() times wit...
virtual ~FilterTermPositions()
Base class for filtering TermPositions implementations.
Definition: FilterIndexReader.h:102
boost::shared_ptr< Document > DocumentPtr
Definition: LuceneTypes.h:74
virtual void doSetNorm(int32_t doc, const String &field, uint8_t value)
Implements setNorm in subclass.
Definition: AbstractAllTermDocs.h:12
FilterTermPositions(const TermPositionsPtr &in)
virtual TermDocsPtr termDocs(const TermPtr &term)
Returns an enumeration of all the documents which contain term. For each document,...
Base class for all Lucene classes.
Definition: LuceneObject.h:31
boost::shared_ptr< TermEnum > TermEnumPtr
Definition: LuceneTypes.h:235
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
virtual int32_t freq()
Returns the frequency of the term within the current document. This is invalid until next() is called...
boost::shared_ptr< TermDocs > TermDocsPtr
Definition: LuceneTypes.h:236
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition: TermPositions.h:18
virtual int32_t getPayloadLength()
Returns the length of the payload at the current term position. This is invalid until {} is called fo...
virtual HashSet< String > getFieldNames(FieldOption fieldOption)
Get a list of unique field names that exist in this index and have the specified field option informa...
virtual bool hasDeletions()
Returns true if any documents have been deleted.
virtual TermEnumPtr terms()
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term::compareTo()...
IndexReader is an abstract class, providing an interface for accessing an index. Search of an index i...
Definition: IndexReader.h:39
virtual void seek(const TermEnumPtr &termEnum)
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementatio...
boost::shared_ptr< TermFreqVector > TermFreqVectorPtr
Definition: LuceneTypes.h:237
virtual int32_t read(Collection< int32_t > docs, Collection< int32_t > freqs)
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are st...
FieldOption
Constants describing field properties, for example used for IndexReader#getFieldNames(FieldOption).
Definition: IndexReader.h:48
A FilterIndexReader contains another IndexReader, which it uses as its basic source of data,...
Definition: FilterIndexReader.h:21
virtual void seek(const TermPtr &term)
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.
virtual Collection< TermFreqVectorPtr > getTermFreqVectors(int32_t docNumber)
Return an array of term frequency vectors for the specified document. The array contains a vector for...
virtual bool next()
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumerati...
virtual TermFreqVectorPtr getTermFreqVector(int32_t docNumber, const String &field)
Return a term frequency vector for the specified document and field. The returned vector contains ter...
virtual int64_t getVersion()
Version number when this IndexReader was opened. Not implemented in the IndexReader base class.
boost::shared_ptr< TermPositions > TermPositionsPtr
Definition: LuceneTypes.h:243
virtual void close()
Frees associated resources.
virtual int32_t maxDoc()
Returns one greater than the largest possible document number. This may be used to,...
virtual LuceneObjectPtr getFieldCacheKey()
If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must override thi...
FilterTermDocs(const TermDocsPtr &in)
boost::shared_ptr< Directory > DirectoryPtr
Definition: LuceneTypes.h:489
virtual TermDocsPtr termDocs()
Returns an unpositioned TermDocs enumerator.
virtual void getTermFreqVector(int32_t docNumber, const TermVectorMapperPtr &mapper)
Map all the term vectors for all fields in a Document.
boost::shared_ptr< FieldSelector > FieldSelectorPtr
Definition: LuceneTypes.h:77
virtual Collection< IndexReaderPtr > getSequentialSubReaders()
Returns the sequential sub readers that this reader is logically composed of. For example,...
virtual void norms(const String &field, ByteArray norms, int32_t offset)
Reads the byte-encoded normalization factor for the named field of every document....
IndexReaderPtr in
Definition: FilterIndexReader.h:32
virtual ~FilterTermDocs()
virtual bool skipTo(int32_t target)
Skips entries to the first beyond the current whose document number is greater than or equal to targe...
virtual void doUndeleteAll()
Implements actual undeleteAll() in subclass.
virtual void doDelete(int32_t docNum)
Implements deletion of the document numbered docNum. Applications should call deleteDocument(int) or ...
virtual TermEnumPtr terms(const TermPtr &t)
Returns an enumeration of all terms starting at a given term. If the given term does not exist,...
virtual bool isOptimized()
Checks is the index is optimized (if it has a single segment and no deletions). Not implemented in th...
virtual ByteArray norms(const String &field)
Returns the byte-encoded normalization factor for the named field of every document....
virtual void getTermFreqVector(int32_t docNumber, const String &field, const TermVectorMapperPtr &mapper)
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of ...
virtual ~FilterIndexReader()
TermDocsPtr in
Definition: FilterIndexReader.h:85
virtual void doClose()
Implements close.
clucene.sourceforge.net