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);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
A FilterIndexReader contains another IndexReader, which it uses as its basic source of data,...
Definition FilterIndexReader.h:21
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 int32_t numDocs()
Returns the number of documents in this index.
virtual void doSetNorm(int32_t doc, const String &field, uint8_t value)
Implements setNorm in subclass.
virtual void doUndeleteAll()
Implements actual undeleteAll() in subclass.
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...
virtual LuceneObjectPtr getDeletesCacheKey()
If the subclass of FilteredIndexReader modifies the deleted docs, you must override this method to pr...
virtual DirectoryPtr directory()
Returns the directory associated with this index. The default implementation returns the directory sp...
virtual TermDocsPtr termDocs(const TermPtr &term)
Returns an enumeration of all the documents which contain term. For each document,...
virtual TermDocsPtr termDocs()
Returns an unpositioned TermDocs enumerator.
virtual void doCommit(MapStringString commitUserData)
Implements commit.
virtual Collection< IndexReaderPtr > getSequentialSubReaders()
Returns the sequential sub readers that this reader is logically composed of. For example,...
IndexReaderPtr in
Definition FilterIndexReader.h:35
virtual ~FilterIndexReader()
virtual TermPositionsPtr termPositions()
Returns an unpositioned TermPositions enumerator.
FilterIndexReader(const IndexReaderPtr &in)
Construct a FilterIndexReader based on the specified base reader. Directory locking for delete,...
virtual TermEnumPtr terms()
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term::compareTo()...
virtual ByteArray norms(const String &field)
Returns the byte-encoded normalization factor for the named field of every document....
virtual bool isOptimized()
Checks is the index is optimized (if it has a single segment and no deletions). Not implemented in th...
virtual bool hasDeletions()
Returns true if any documents have been deleted.
virtual LuceneObjectPtr getFieldCacheKey()
If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must override thi...
virtual void doClose()
Implements close.
virtual bool isDeleted(int32_t n)
Returns true if document n has been deleted.
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 void doDelete(int32_t docNum)
Implements deletion of the document numbered docNum. Applications should call deleteDocument(int) or ...
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 isCurrent()
Check whether any new changes have occurred to the index since this reader was opened.
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 void getTermFreqVector(int32_t docNumber, const TermVectorMapperPtr &mapper)
Map all the term vectors for all fields in a Document.
virtual void norms(const String &field, ByteArray norms, int32_t offset)
Reads the byte-encoded normalization factor for the named field of every document....
virtual bool hasNorms(const String &field)
Returns true if there are norms stored for this field.
virtual int32_t maxDoc()
Returns one greater than the largest possible document number. This may be used to,...
virtual int32_t docFreq(const TermPtr &t)
Returns the number of documents containing the term t.
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 int64_t getVersion()
Version number when this IndexReader was opened. Not implemented in the IndexReader base class.
Base class for filtering TermDocs implementations.
Definition FilterIndexReader.h:80
TermDocsPtr in
Definition FilterIndexReader.h:88
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...
virtual int32_t doc()
Returns the current document number. This is invalid until next() is called for the first time.
virtual bool next()
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumerati...
virtual void close()
Frees associated resources.
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 int32_t freq()
Returns the frequency of the term within the current document. This is invalid until next() is called...
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...
FilterTermDocs(const TermDocsPtr &in)
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.
Base class for filtering TermPositions implementations.
Definition FilterIndexReader.h:102
virtual ~FilterTermPositions()
FilterTermPositions(const TermPositionsPtr &in)
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 int32_t getPayloadLength()
Returns the length of the payload at the current term position. This is invalid until nextPosition() ...
virtual bool isPayloadAvailable()
Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to next...
virtual int32_t nextPosition()
Returns next position in the current document. It is an error to call this more than freq() times wit...
Utility template class to handle hash set collections that can be safely copied and shared.
Definition HashSet.h:17
IndexReader is an abstract class, providing an interface for accessing an index. Search of an index i...
Definition IndexReader.h:39
FieldOption
Constants describing field properties, for example used for IndexReader#getFieldNames(FieldOption).
Definition IndexReader.h:48
Base class for all Lucene classes.
Definition LuceneObject.h:31
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition TermPositions.h:18
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
boost::shared_ptr< TermPositions > TermPositionsPtr
Definition LuceneTypes.h:243
boost::shared_ptr< TermDocs > TermDocsPtr
Definition LuceneTypes.h:236
boost::shared_ptr< FieldSelector > FieldSelectorPtr
Definition LuceneTypes.h:77
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
boost::shared_ptr< TermVectorMapper > TermVectorMapperPtr
Definition LuceneTypes.h:254
boost::shared_ptr< Directory > DirectoryPtr
Definition LuceneTypes.h:489
boost::shared_ptr< TermEnum > TermEnumPtr
Definition LuceneTypes.h:235
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
boost::shared_ptr< TermFreqVector > TermFreqVectorPtr
Definition LuceneTypes.h:237
boost::shared_ptr< Document > DocumentPtr
Definition LuceneTypes.h:74