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

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< BooleanScorerCollector > | shared_from_this ()
virtual void | collect (int32_t doc)
| Called once for every document matching a query, with the unbased document number. More...
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). More...
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. More...
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. More...
Public Member Functions inherited from Lucene::Collector
virtual | ~Collector ()
boost::shared_ptr< Collector > | shared_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. More...
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Return clone of this object. More...
virtual int32_t | hashCode ()
| Return hash code for this object. More...
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal. More...
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects. More...
virtual String | toString ()
| Returns a string representation of the object. More...
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

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

## Protected Attributes

BucketTableWeakPtr | _bucketTable
int32_t | mask
ScorerWeakPtr | _scorer
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 | ( |  | ) |

inline static

## ◆ 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 | ( |  | ) |

inline virtual

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

  reader | next 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

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:

- BooleanScorer.h

clucene.sourceforge.net