Interface for a weighting function with its state and context used during calculation.
More...
#include <weightingFunctionContextInterface.hpp>
Interface for a weighting function with its state and context used during calculation.
virtual strus::WeightingFunctionContextInterface::~WeightingFunctionContextInterface |
( |
| ) |
|
|
inlinevirtual |
virtual void strus::WeightingFunctionContextInterface::addWeightingFeature |
( |
const std::string & |
name_, |
|
|
PostingIteratorInterface * |
postingIterator_, |
|
|
double |
weight_, |
|
|
const TermStatistics & |
stats_ |
|
) |
| |
|
pure virtual |
Add a feature that is subject of weighting to the execution context.
- Parameters
-
[in] | name_ | name of the weighting feature |
[in] | postingIterator_ | iterator on the matches of the weighting feature (ownership remains at caller) |
[in] | weight_ | weight of this feature |
[in] | stats_ | global term statistics passed down with the query. If undefined, they can be defined by or estimated from the posting iterator data. |
virtual double strus::WeightingFunctionContextInterface::call |
( |
const Index & |
docno | ) |
|
|
pure virtual |
Call the weighting function for a document.
- Parameters
-
- Returns
- the calculated weight of the document
virtual std::string strus::WeightingFunctionContextInterface::debugCall |
( |
const Index & |
docno | ) |
|
|
pure virtual |
Get debug info dumped as string of the weighting call for one document.
- Parameters
-
[in] | docno | document to get the debug info from |
- Returns
- the debug info as string
virtual void strus::WeightingFunctionContextInterface::setVariableValue |
( |
const std::string & |
name, |
|
|
double |
value |
|
) |
| |
|
pure virtual |
Set the value of a query variable.
- Parameters
-
[in] | name | name of the variable |
[in] | value | value of the variable |
The documentation for this class was generated from the following file: