Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
TopFieldCollector.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 TOPFIELDCOLLECTOR_H
8
#define TOPFIELDCOLLECTOR_H
9
10
#include "
TopDocsCollector.h
"
11
12
namespace
Lucene {
13
17
class
LPPAPI
TopFieldCollector
:
public
TopDocsCollector
{
18
public
:
19
TopFieldCollector
(
const
HitQueueBasePtr
& pq, int32_t numHits,
bool
fillFields);
20
virtual
~
TopFieldCollector
();
21
22
LUCENE_CLASS
(
TopFieldCollector
);
23
24
protected
:
25
bool
fillFields;
26
29
double
maxScore
;
30
31
int32_t
numHits
;
32
FieldValueHitQueueEntryPtr
bottom
;
33
bool
queueFull
;
34
int32_t
docBase
;
35
36
public
:
55
static
TopFieldCollectorPtr
create(
const
SortPtr
& sort, int32_t numHits,
bool
fillFields,
bool
trackDocScores,
bool
trackMaxScore,
bool
docsScoredInOrder);
56
57
virtual
void
add(int32_t slot, int32_t doc,
double
score);
58
59
virtual
bool
acceptsDocsOutOfOrder();
60
61
protected
:
62
static
const
Collection<ScoreDocPtr>
EMPTY_SCOREDOCS();
63
66
virtual
void
populateResults(
Collection<ScoreDocPtr>
results, int32_t howMany);
67
68
virtual
TopDocsPtr
newTopDocs(
Collection<ScoreDocPtr>
results, int32_t start);
69
};
70
71
}
72
73
#endif
clucene.sourceforge.net