Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
CustomScoreProvider.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 CUSTOMSCOREPROVIDER_H
8
#define CUSTOMSCOREPROVIDER_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene
{
13
21
class
LPPAPI
CustomScoreProvider
:
public
LuceneObject
{
22
public
:
24
CustomScoreProvider
(
const
IndexReaderPtr
&
reader
);
25
26
virtual
~CustomScoreProvider
();
27
28
LUCENE_CLASS
(
CustomScoreProvider
);
29
30
protected
:
31
IndexReaderPtr
reader
;
32
33
public
:
52
virtual
double
customScore
(int32_t doc,
double
subQueryScore,
Collection<double>
valSrcScores);
53
71
virtual
double
customScore
(int32_t doc,
double
subQueryScore,
double
valSrcScore);
72
80
virtual
ExplanationPtr
customExplain
(int32_t doc,
const
ExplanationPtr
& subQueryExpl,
Collection<ExplanationPtr>
valSrcExpls);
81
88
virtual
ExplanationPtr
customExplain
(int32_t doc,
const
ExplanationPtr
& subQueryExpl,
const
ExplanationPtr
& valSrcExpl);
89
};
90
91
}
92
93
#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition
Collection.h:17
Lucene::CustomScoreProvider::customScore
virtual double customScore(int32_t doc, double subQueryScore, double valSrcScore)
Compute a custom score by the subQuery score and the ValueSourceQuery score.
Lucene::CustomScoreProvider::customExplain
virtual ExplanationPtr customExplain(int32_t doc, const ExplanationPtr &subQueryExpl, Collection< ExplanationPtr > valSrcExpls)
Explain the custom score. Whenever overriding customScore(int32_t, double, Collection<double>),...
Lucene::CustomScoreProvider::CustomScoreProvider
CustomScoreProvider(const IndexReaderPtr &reader)
Creates a new instance of the provider class for the given IndexReader.
Lucene::CustomScoreProvider::reader
IndexReaderPtr reader
Definition
CustomScoreProvider.h:31
Lucene::CustomScoreProvider::customExplain
virtual ExplanationPtr customExplain(int32_t doc, const ExplanationPtr &subQueryExpl, const ExplanationPtr &valSrcExpl)
Explain the custom score. Whenever overriding customScore(int32_t, double, double),...
Lucene::CustomScoreProvider::customScore
virtual double customScore(int32_t doc, double subQueryScore, Collection< double > valSrcScores)
Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.
Lucene::CustomScoreProvider::~CustomScoreProvider
virtual ~CustomScoreProvider()
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::ExplanationPtr
boost::shared_ptr< Explanation > ExplanationPtr
Definition
LuceneTypes.h:333
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition
LuceneTypes.h:157
clucene.sourceforge.net