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
TopDocsCollector.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 TOPDOCSCOLLECTOR_H
8
#define TOPDOCSCOLLECTOR_H
9
10
#include "
Collector.h
"
11
#include "
PriorityQueue.h
"
12
13
namespace
Lucene
14
{
21
class
LPPAPI
TopDocsCollector
:
public
Collector
22
{
23
public
:
24
TopDocsCollector
(
HitQueueBasePtr
pq);
25
virtual
~
TopDocsCollector
();
26
27
LUCENE_CLASS
(
TopDocsCollector
);
28
29
protected
:
33
HitQueueBasePtr
pq;
34
36
int32_t
totalHits
;
37
38
public
:
40
virtual
int32_t getTotalHits();
41
43
virtual
TopDocsPtr
topDocs();
44
54
virtual
TopDocsPtr
topDocs(int32_t start);
55
66
virtual
TopDocsPtr
topDocs(int32_t start, int32_t howMany);
67
68
protected
:
70
static
TopDocsPtr
EMPTY_TOPDOCS();
71
74
virtual
void
populateResults(
Collection<ScoreDocPtr>
results, int32_t howMany);
75
79
virtual
TopDocsPtr
newTopDocs(
Collection<ScoreDocPtr>
results, int32_t start);
80
};
81
}
82
83
#endif
clucene.sourceforge.net