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


TopDocs.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 TOPDOCS_H
8 #define TOPDOCS_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene {
13 
16 class LPPAPI TopDocs : public LuceneObject {
17 public:
19  TopDocs(int32_t totalHits, Collection<ScoreDocPtr> scoreDocs);
20 
22  TopDocs(int32_t totalHits, Collection<ScoreDocPtr> scoreDocs, double maxScore);
23 
24  virtual ~TopDocs();
25 
27 
28 public:
30  int32_t totalHits;
31 
34 
36  double maxScore;
37 
38 public:
41  double getMaxScore();
42 
44  void setMaxScore(double maxScore);
45 };
46 
47 }
48 
49 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Represents hits returned by Searcher#search(QueryPtr, FilterPtr, int32_t) and {}.
Definition: TopDocs.h:16
TopDocs(int32_t totalHits, Collection< ScoreDocPtr > scoreDocs)
Constructs a TopDocs with a default maxScore = double.NaN.
void setMaxScore(double maxScore)
Sets the maximum score value encountered.
double getMaxScore()
Returns the maximum score value encountered. Note that in case scores are not tracked,...
int32_t totalHits
The total number of hits for the query.
Definition: TopDocs.h:26
Collection< ScoreDocPtr > scoreDocs
The top hits for the query.
Definition: TopDocs.h:33
virtual ~TopDocs()
double maxScore
Stores the maximum score value encountered, needed for normalizing.
Definition: TopDocs.h:36
TopDocs(int32_t totalHits, Collection< ScoreDocPtr > scoreDocs, double maxScore)
Constructs a TopDocs.
Definition: AbstractAllTermDocs.h:12

clucene.sourceforge.net