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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

TopScoreDocCollector.h
Go to the documentation of this file.
1 // 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
28 INTERNAL:
29 ScoreDocPtr pqTop;
30 int32_t docBase;
31 ScorerWeakPtr _scorer;
32
33 public:
38 static TopScoreDocCollectorPtr create(int32_t numHits, bool docsScoredInOrder);
39
40 virtual void setNextReader(const IndexReaderPtr& reader, int32_t docBase);
41 virtual void setScorer(const ScorerPtr& scorer);
42
43 protected:
44 virtual TopDocsPtr newTopDocs(Collection<ScoreDocPtr> results, int32_t start);
45 };
46
47 }
48
49 #endif
Lucene::TopScoreDocCollectorPtr
boost::shared_ptr< TopScoreDocCollector > TopScoreDocCollectorPtr
Definition: LuceneTypes.h:475
Lucene::ScorerWeakPtr
boost::weak_ptr< Scorer > ScorerWeakPtr
Definition: LuceneTypes.h:429
Lucene::TopScoreDocCollector
A Collector implementation that collects the top-scoring hits, returning them as a TopDocs...
Definition: TopScoreDocCollector.h:21
Lucene::ScoreDocPtr
boost::shared_ptr< ScoreDoc > ScoreDocPtr
Definition: LuceneTypes.h:428
Lucene::TopDocsCollector
A base class for all collectors that return a TopDocs output. This collector allows easy extension by...
Definition: TopDocsCollector.h:21
Lucene::ScorerPtr
boost::shared_ptr< Scorer > ScorerPtr
Definition: LuceneTypes.h:429
TopDocsCollector.h
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::TopDocsPtr
boost::shared_ptr< TopDocs > TopDocsPtr
Definition: LuceneTypes.h:471
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::Collection< ScoreDocPtr >
Lucene::TopScoreDocCollector::docBase
int32_t docBase
Definition: TopScoreDocCollector.h:30
Lucene::TopScoreDocCollector::_scorer
ScorerWeakPtr _scorer
Definition: TopScoreDocCollector.h:31

clucene.sourceforge.net