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 // Copyright (c) 2009-2011 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  {
23  public:
24  TopScoreDocCollector(int32_t numHits);
25  virtual ~TopScoreDocCollector();
26 
28 
29  INTERNAL:
30  ScoreDocPtr pqTop;
31  int32_t docBase;
33 
34  public:
39  static TopScoreDocCollectorPtr create(int32_t numHits, bool docsScoredInOrder);
40 
41  virtual void setNextReader(IndexReaderPtr reader, int32_t docBase);
42  virtual void setScorer(ScorerPtr scorer);
43 
44  protected:
45  virtual TopDocsPtr newTopDocs(Collection<ScoreDocPtr> results, int32_t start);
46  };
47 }
48 
49 #endif

clucene.sourceforge.net