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