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


Loading...
Searching...
No Matches
TopScoreDocCollector.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef TOPSCOREDOCCOLLECTOR_H
8#define TOPSCOREDOCCOLLECTOR_H
9
10#include "TopDocsCollector.h"
11
12namespace Lucene {
13
22public:
23 TopScoreDocCollector(int32_t numHits);
25
27
28INTERNAL:
29 ScoreDocPtr pqTop;
30 int32_t docBase;
33
34public:
39 static TopScoreDocCollectorPtr create(int32_t numHits, bool docsScoredInOrder);
40
41 virtual void setNextReader(const IndexReaderPtr& reader, int32_t docBase);
42 virtual void setScorer(const ScorerPtr& scorer);
43
44protected:
45 virtual TopDocsPtr newTopDocs(Collection<ScoreDocPtr> results, int32_t start);
46};
47
48}
49
50#endif
#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
Common scoring functionality for different types of queries.
Definition Scorer.h:33
A base class for all collectors that return a TopDocs output. This collector allows easy extension by...
Definition TopDocsCollector.h:21
A Collector implementation that collects the top-scoring hits, returning them as a TopDocs....
Definition TopScoreDocCollector.h:21
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 re...
TopScoreDocCollector(int32_t numHits)
ScorerWeakPtr _scorer
Definition TopScoreDocCollector.h:31
virtual void setScorer(const ScorerPtr &scorer)
Called before successive calls to collect(int32_t). Implementations that need the score of the curren...
int32_t docBase
Definition TopScoreDocCollector.h:30
static TopScoreDocCollectorPtr create(int32_t numHits, bool docsScoredInOrder)
Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scor...
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...
Scorer * __scorer
Definition TopScoreDocCollector.h:32
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< TopDocs > TopDocsPtr
Definition LuceneTypes.h:471
boost::shared_ptr< TopScoreDocCollector > TopScoreDocCollectorPtr
Definition LuceneTypes.h:475
boost::shared_ptr< ScoreDoc > ScoreDocPtr
Definition LuceneTypes.h:428
boost::weak_ptr< Scorer > ScorerWeakPtr
Definition LuceneTypes.h:429
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
boost::shared_ptr< Scorer > ScorerPtr
Definition LuceneTypes.h:429

clucene.sourceforge.net