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
SimilarityDelegator.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 SIMILARITYDELEGATOR_H
8
#define SIMILARITYDELEGATOR_H
9
10
#include "
Similarity.h
"
11
12
namespace
Lucene {
13
16
class
LPPAPI
SimilarityDelegator
:
public
Similarity
{
17
public
:
18
SimilarityDelegator
(
const
SimilarityPtr
& delegee);
19
virtual
~
SimilarityDelegator
();
20
21
LUCENE_CLASS
(
SimilarityDelegator
);
22
23
protected
:
24
SimilarityPtr
delegee;
25
26
public
:
27
virtual
double
computeNorm(
const
String& field,
const
FieldInvertStatePtr
& state);
28
virtual
double
lengthNorm(
const
String& fieldName, int32_t numTokens);
29
virtual
double
queryNorm(
double
sumOfSquaredWeights);
30
virtual
double
tf(
double
freq);
31
virtual
double
sloppyFreq(int32_t distance);
32
virtual
double
idf(int32_t docFreq, int32_t numDocs);
33
virtual
double
coord(int32_t overlap, int32_t maxOverlap);
34
virtual
double
scorePayload(int32_t docId,
const
String& fieldName, int32_t start, int32_t end, ByteArray payload, int32_t offset, int32_t length);
35
};
36
37
}
38
39
#endif
clucene.sourceforge.net