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
DisjunctionSumScorer.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 DISJUNCTIONSUMSCORER_H
8
#define DISJUNCTIONSUMSCORER_H
9
10
#include "
Scorer.h
"
11
12
namespace
Lucene {
13
16
class
DisjunctionSumScorer
:
public
Scorer
{
17
public
:
18
DisjunctionSumScorer
(
Collection<ScorerPtr>
subScorers
, int32_t
minimumNrMatchers
= 1);
19
virtual
~DisjunctionSumScorer
();
20
21
LUCENE_CLASS
(
DisjunctionSumScorer
);
22
23
protected
:
25
int32_t
nrScorers
;
26
28
Collection<ScorerPtr>
subScorers
;
29
31
int32_t
minimumNrMatchers
;
32
40
ScorerDocQueuePtr
scorerDocQueue
;
41
43
int32_t
currentDoc
;
44
46
int32_t
_nrMatchers
;
47
48
double
currentScore
;
49
50
public
:
51
virtual
void
initialize
();
52
53
virtual
void
score
(
const
CollectorPtr
& collector);
54
virtual
int32_t
nextDoc
();
55
58
virtual
double
score
();
59
60
virtual
int32_t
docID
();
61
64
int32_t
nrMatchers
();
65
71
virtual
int32_t
advance
(int32_t target);
72
73
protected
:
75
void
initScorerDocQueue
();
76
82
virtual
bool
score
(
const
CollectorPtr
& collector, int32_t max, int32_t firstDocID);
83
90
bool
advanceAfterCurrent
();
91
};
92
93
}
94
95
#endif
clucene.sourceforge.net