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
12 namespace Lucene {
13
21 class LPPAPI TopScoreDocCollector : public TopDocsCollector {
22 public:
23 TopScoreDocCollector(int32_t numHits);
24 virtual ~TopScoreDocCollector();
25
26 LUCENE_CLASS(TopScoreDocCollector);
27
28INTERNAL:
29 ScoreDocPtr pqTop;
30 int32_t docBase;
31 ScorerWeakPtr _scorer;
32 Scorer* __scorer;
33
34 public:
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
44 protected:
45 virtual TopDocsPtr newTopDocs(Collection<ScoreDocPtr> results, int32_t start);
46};
47
48}
49
50#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TopDocsCollector.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::Scorer
Common scoring functionality for different types of queries.
Definition Scorer.h:33
Lucene::TopDocsCollector::TopDocsCollector
TopDocsCollector(const HitQueueBasePtr &pq)
Lucene::TopScoreDocCollector::setNextReader
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...
Lucene::TopScoreDocCollector::TopScoreDocCollector
TopScoreDocCollector(int32_t numHits)
Lucene::TopScoreDocCollector::_scorer
ScorerWeakPtr _scorer
Definition TopScoreDocCollector.h:31
Lucene::TopScoreDocCollector::setScorer
virtual void setScorer(const ScorerPtr &scorer)
Called before successive calls to collect(int32_t). Implementations that need the score of the curren...
Lucene::TopScoreDocCollector::~TopScoreDocCollector
virtual ~TopScoreDocCollector()
Lucene::TopScoreDocCollector::docBase
int32_t docBase
Definition TopScoreDocCollector.h:30
Lucene::TopScoreDocCollector::create
static TopScoreDocCollectorPtr create(int32_t numHits, bool docsScoredInOrder)
Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scor...
Lucene::TopScoreDocCollector::newTopDocs
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...
Lucene::TopScoreDocCollector::__scorer
Scorer * __scorer
Definition TopScoreDocCollector.h:32
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::TopScoreDocCollectorPtr
boost::shared_ptr< TopScoreDocCollector > TopScoreDocCollectorPtr
Definition LuceneTypes.h:475
Lucene::ScorerWeakPtr
boost::weak_ptr< Scorer > ScorerWeakPtr
Definition LuceneTypes.h:429
Lucene::ScoreDocPtr
boost::shared_ptr< ScoreDoc > ScoreDocPtr
Definition LuceneTypes.h:428
Lucene::TopDocsPtr
boost::shared_ptr< TopDocs > TopDocsPtr
Definition LuceneTypes.h:471
Lucene::ScorerPtr
boost::shared_ptr< Scorer > ScorerPtr
Definition LuceneTypes.h:429
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net