Lucene++ - a full-featured, c++ search engine
API Documentation
A Collector
implementation which wraps another Collector
and makes sure only documents with scores > 0 are collected.
More...
#include <PositiveScoresOnlyCollector.h>
Public Member Functions | |
PositiveScoresOnlyCollector (const CollectorPtr &c) | |
virtual | ~PositiveScoresOnlyCollector () |
virtual String | getClassName () |
boost::shared_ptr< PositiveScoresOnlyCollector > | shared_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 . | |
![]() | |
virtual | ~Collector () |
boost::shared_ptr< Collector > | shared_from_this () |
![]() | |
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. | |
![]() | |
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 String | _getClassName () |
Protected Attributes | |
CollectorPtr | collector |
ScorerPtr | scorer |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
A Collector
implementation which wraps another Collector
and makes sure only documents with scores > 0 are collected.
Lucene::PositiveScoresOnlyCollector::PositiveScoresOnlyCollector | ( | const CollectorPtr & | c | ) |
|
virtual |
|
inlinestatic |
|
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.
|
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.
|
inlinevirtual |
Reimplemented from Lucene::Collector.
|
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)
.
reader | next IndexReader |
docBase |
Implements Lucene::Collector.
|
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.
|
inline |
|
protected |
|
protected |