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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 
27 
28 INTERNAL:
29  ScoreDocPtr pqTop;
30  int32_t docBase;
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

clucene.sourceforge.net