7#ifndef TOPFIELDCOLLECTOR_H
8#define TOPFIELDCOLLECTOR_H
57 virtual void add(int32_t slot, int32_t doc,
double score);
#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 base class for all collectors that return a TopDocs output. This collector allows easy extension by...
Definition TopDocsCollector.h:21
A Collector that sorts by SortField using FieldComparators.
Definition TopFieldCollector.h:17
virtual TopDocsPtr newTopDocs(Collection< ScoreDocPtr > results, int32_t start)
Returns a TopDocs instance containing the given results. If results is null it means there are no res...
TopFieldCollector(const HitQueueBasePtr &pq, int32_t numHits, bool fillFields)
virtual bool acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order ...
int32_t docBase
Definition TopFieldCollector.h:34
bool queueFull
Definition TopFieldCollector.h:33
virtual void add(int32_t slot, int32_t doc, double score)
double maxScore
Stores the maximum score value encountered, needed for normalizing. If document scores are not tracke...
Definition TopFieldCollector.h:29
static const Collection< ScoreDocPtr > EMPTY_SCOREDOCS()
virtual void populateResults(Collection< ScoreDocPtr > results, int32_t howMany)
Only the following callback methods need to be overridden since topDocs(int32_t, int32_t) calls them ...
FieldValueHitQueueEntryPtr bottom
Definition TopFieldCollector.h:32
virtual ~TopFieldCollector()
int32_t numHits
Definition TopFieldCollector.h:31
bool fillFields
Definition TopFieldCollector.h:25
static TopFieldCollectorPtr create(const SortPtr &sort, int32_t numHits, bool fillFields, bool trackDocScores, bool trackMaxScore, bool docsScoredInOrder)
Creates a new TopFieldCollector from the given arguments.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< TopDocs > TopDocsPtr
Definition LuceneTypes.h:471
boost::shared_ptr< HitQueueBase > HitQueueBasePtr
Definition LuceneTypes.h:371
boost::shared_ptr< TopFieldCollector > TopFieldCollectorPtr
Definition LuceneTypes.h:473
boost::shared_ptr< Sort > SortPtr
Definition LuceneTypes.h:442
boost::shared_ptr< FieldValueHitQueueEntry > FieldValueHitQueueEntryPtr
Definition LuceneTypes.h:357