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


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::BooleanScorerCollector Class Reference

#include <BooleanScorer.h>

+ Inheritance diagram for Lucene::BooleanScorerCollector:

Public Member Functions

 BooleanScorerCollector (int32_t mask, const BucketTablePtr &bucketTable)
 
virtual ~BooleanScorerCollector ()
 
virtual String getClassName ()
 
boost::shared_ptr< BooleanScorerCollectorshared_from_this ()
 
virtual void collect (int32_t doc)
 Called once for every document matching a query, with the unbased document number.
 
virtual void setNextReader (const IndexReaderPtr &reader, int32_t docBase)
 Called before collecting from each IndexReader. All doc ids in collect(int32_t) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in collect(int32_t).
 
virtual void setScorer (const ScorerPtr &scorer)
 Called before successive calls to collect(int32_t). Implementations that need the score of the current document (passed-in to collect(int32_t)), should save the passed-in Scorer and call scorer.score() when needed.
 
virtual bool acceptsDocsOutOfOrder ()
 Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to collect.
 
- Public Member Functions inherited from Lucene::Collector
virtual ~Collector ()
 
boost::shared_ptr< Collectorshared_from_this ()
 
- 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::Collector
static String _getClassName ()
 

Protected Attributes

BucketTableWeakPtr _bucketTable
 
BucketTable__bucketTable = nullptr
 
int32_t mask
 
ScorerWeakPtr _scorer
 
Scorer__scorer = nullptr
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ BooleanScorerCollector()

Lucene::BooleanScorerCollector::BooleanScorerCollector ( int32_t  mask,
const BucketTablePtr bucketTable 
)

◆ ~BooleanScorerCollector()

virtual Lucene::BooleanScorerCollector::~BooleanScorerCollector ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::BooleanScorerCollector::_getClassName ( )
inlinestatic

◆ acceptsDocsOutOfOrder()

virtual bool Lucene::BooleanScorerCollector::acceptsDocsOutOfOrder ( )
virtual

Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to collect.

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Implements Lucene::Collector.

◆ collect()

virtual void Lucene::BooleanScorerCollector::collect ( int32_t  doc)
virtual

Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher#doc(int32_t) or IndexReader#document(int32_t) on every hit. Doing so can slow searches by an order of magnitude or more.

Implements Lucene::Collector.

◆ getClassName()

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

Reimplemented from Lucene::Collector.

◆ setNextReader()

virtual void Lucene::BooleanScorerCollector::setNextReader ( const IndexReaderPtr reader,
int32_t  docBase 
)
virtual

Called before collecting from each IndexReader. All doc ids in collect(int32_t) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in collect(int32_t).

Parameters
readernext IndexReader
docBase

Implements Lucene::Collector.

◆ setScorer()

virtual void Lucene::BooleanScorerCollector::setScorer ( const ScorerPtr scorer)
virtual

Called before successive calls to collect(int32_t). Implementations that need the score of the current document (passed-in to collect(int32_t)), should save the passed-in Scorer and call scorer.score() when needed.

Implements Lucene::Collector.

◆ shared_from_this()

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

Field Documentation

◆ __bucketTable

BucketTable* Lucene::BooleanScorerCollector::__bucketTable = nullptr
protected

◆ __scorer

Scorer* Lucene::BooleanScorerCollector::__scorer = nullptr
protected

◆ _bucketTable

BucketTableWeakPtr Lucene::BooleanScorerCollector::_bucketTable
protected

◆ _scorer

ScorerWeakPtr Lucene::BooleanScorerCollector::_scorer
protected

◆ mask

int32_t Lucene::BooleanScorerCollector::mask
protected

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

clucene.sourceforge.net