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


Loading...
Searching...
No Matches
Lucene::AbstractAllTermDocs Class Referenceabstract

Base class for enumerating all but deleted docs. More...

#include <AbstractAllTermDocs.h>

Inheritance diagram for Lucene::AbstractAllTermDocs:

Public Member Functions

 AbstractAllTermDocs (int32_t maxDoc)
virtual ~AbstractAllTermDocs ()
virtual String getClassName ()
boost::shared_ptr< AbstractAllTermDocsshared_from_this ()
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 void seek (const TermEnumPtr &termEnum)
 Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.
virtual int32_t doc ()
 Returns the current document number. This is invalid until next() is called for the first time.
virtual int32_t freq ()
 Returns the frequency of the term within the current document. 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 enumeration.
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 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)
 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 ()
 Frees associated resources.
virtual bool isDeleted (int32_t doc)=0
Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
virtual int32_t hashCode ()
 Return hash code for this object.
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
virtual String toString ()
 Returns a string representation of the object.
Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
virtual void unlock ()
 Unlock this object.
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
virtual void notifyAll ()
 Notify all threads waiting for signal.

Static Public Member Functions

static String _getClassName ()
Static Public Member Functions inherited from Lucene::TermDocs
static String _getClassName ()

Protected Attributes

int32_t maxDoc
int32_t _doc
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
LuceneSignalPtr objectSignal

Additional Inherited Members

Protected Member Functions inherited from Lucene::TermDocs
 TermDocs ()
Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()

Detailed Description

Base class for enumerating all but deleted docs.

NOTE: this class is meant only to be used internally by Lucene; it's only public so it can be shared across packages.

Constructor & Destructor Documentation

◆ AbstractAllTermDocs()

Lucene::AbstractAllTermDocs::AbstractAllTermDocs ( int32_t maxDoc)

References maxDoc.

Referenced by _getClassName().

◆ ~AbstractAllTermDocs()

virtual Lucene::AbstractAllTermDocs::~AbstractAllTermDocs ( )
virtual

Member Function Documentation

◆ _getClassName()

String Lucene::AbstractAllTermDocs::_getClassName ( )
inlinestatic

References AbstractAllTermDocs().

◆ close()

virtual void Lucene::AbstractAllTermDocs::close ( )
virtual

Frees associated resources.

Implements Lucene::TermDocs.

◆ doc()

virtual int32_t Lucene::AbstractAllTermDocs::doc ( )
virtual

Returns the current document number. This is invalid until next() is called for the first time.

Implements Lucene::TermDocs.

Referenced by isDeleted(), and Lucene::AllTermDocs::isDeleted().

◆ freq()

virtual int32_t Lucene::AbstractAllTermDocs::freq ( )
virtual

Returns the frequency of the term within the current document. This is invalid until next() is called for the first time.

Implements Lucene::TermDocs.

◆ getClassName()

virtual String Lucene::AbstractAllTermDocs::getClassName ( )
inlinevirtual

Reimplemented from Lucene::TermDocs.

Reimplemented in Lucene::AllTermDocs.

◆ isDeleted()

virtual bool Lucene::AbstractAllTermDocs::isDeleted ( int32_t doc)
pure virtual

Implemented in Lucene::AllTermDocs.

References doc().

◆ next()

virtual bool Lucene::AbstractAllTermDocs::next ( )
virtual

Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration.

Implements Lucene::TermDocs.

◆ read()

virtual int32_t Lucene::AbstractAllTermDocs::read ( Collection< int32_t > & docs,
Collection< int32_t > & freqs )
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.

Implements Lucene::TermDocs.

◆ seek() [1/2]

virtual void Lucene::AbstractAllTermDocs::seek ( const TermEnumPtr & termEnum)
virtual

Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Implements Lucene::TermDocs.

◆ seek() [2/2]

virtual void Lucene::AbstractAllTermDocs::seek ( const TermPtr & term)
virtual

Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Implements Lucene::TermDocs.

◆ shared_from_this()

boost::shared_ptr< AbstractAllTermDocs > Lucene::AbstractAllTermDocs::shared_from_this ( )
inline

◆ skipTo()

virtual bool Lucene::AbstractAllTermDocs::skipTo ( int32_t target)
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.

Implements Lucene::TermDocs.

Field Documentation

◆ _doc

int32_t Lucene::AbstractAllTermDocs::_doc
protected

◆ maxDoc

int32_t Lucene::AbstractAllTermDocs::maxDoc
protected

Referenced by AbstractAllTermDocs().


The documentation for this class was generated from the following file:

clucene.sourceforge.net