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

clucene.sourceforge.net