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
ScorerDocQueue.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 SCORERDOCQUEUE_H
8
#define SCORERDOCQUEUE_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene {
13
16
class
LPPAPI
ScorerDocQueue
:
public
LuceneObject
{
17
public
:
18
ScorerDocQueue
(int32_t maxSize);
19
virtual
~
ScorerDocQueue
();
20
21
LUCENE_CLASS
(
ScorerDocQueue
);
22
23
protected
:
24
Collection<HeapedScorerDocPtr>
heap;
25
int32_t
maxSize
;
26
int32_t
_size
;
27
HeapedScorerDocPtr
topHSD
;
// same as heap[1], only for speed
28
29
public
:
32
void
put(
const
ScorerPtr
& scorer);
33
37
bool
insert(
const
ScorerPtr
& scorer);
38
41
ScorerPtr
top();
42
45
int32_t topDoc();
46
47
double
topScore();
48
bool
topNextAndAdjustElsePop();
49
bool
topSkipToAndAdjustElsePop(int32_t target);
50
53
ScorerPtr
pop();
54
56
void
adjustTop();
57
59
int32_t size();
60
62
void
clear();
63
64
protected
:
65
bool
checkAdjustElsePop(
bool
cond);
66
69
void
popNoResult();
70
71
void
upHeap();
72
void
downHeap();
73
};
74
75
}
76
77
#endif
clucene.sourceforge.net