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
TermScorer.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 TERMSCORER_H
8
#define TERMSCORER_H
9
10
#include "
Scorer.h
"
11
12
namespace
Lucene {
13
15
class
TermScorer
:
public
Scorer
{
16
public
:
22
TermScorer
(
const
WeightPtr
&
weight
,
const
TermDocsPtr
& td,
const
SimilarityPtr
&
similarity
, ByteArray
norms
);
23
24
virtual
~TermScorer
();
25
26
LUCENE_CLASS
(
TermScorer
);
27
28
protected
:
29
WeightPtr
weight
;
30
TermDocsPtr
termDocs
;
31
ByteArray
norms
;
32
double
weightValue
;
33
int32_t
doc
;
34
35
Collection<int32_t>
docs
;
// buffered doc numbers
36
Collection<int32_t>
freqs
;
// buffered term freqs
37
int32_t
pointer
;
38
int32_t
pointerMax
;
39
40
static
const
int32_t
SCORE_CACHE_SIZE
;
41
Collection<double>
scoreCache
;
42
43
public
:
44
virtual
void
score
(
const
CollectorPtr
& collector);
45
virtual
int32_t
docID
();
46
51
virtual
int32_t
nextDoc
();
52
53
virtual
double
score
();
54
59
virtual
int32_t
advance
(int32_t target);
60
62
virtual
String
toString
();
63
64
protected
:
65
static
const
Collection<double>
SIM_NORM_DECODER
();
66
67
virtual
bool
score
(
const
CollectorPtr
& collector, int32_t max, int32_t firstDocID);
68
};
69
70
}
71
72
#endif
clucene.sourceforge.net