Defines a query evaluation scheme.
More...
#include <queryEvalInterface.hpp>
Defines a query evaluation scheme.
| virtual strus::QueryEvalInterface::~QueryEvalInterface |
( |
| ) |
|
|
inlinevirtual |
| virtual void strus::QueryEvalInterface::addExclusionFeature |
( |
const std::string & |
set_ | ) |
|
|
pure virtual |
Define a set of features to be used as exclusion (exclude documents that contain a feature of the set declared)
- Parameters
-
| [in] | set_ | name of the set of the exclusion feature |
| virtual void strus::QueryEvalInterface::addRestrictionFeature |
( |
const std::string & |
set_ | ) |
|
|
pure virtual |
Define a set of features to be used as restriction (exclude documents that do not contain a feature of the set declared)
- Parameters
-
| [in] | set_ | name of the set of the restriction feature |
| virtual void strus::QueryEvalInterface::addSelectionFeature |
( |
const std::string & |
set_ | ) |
|
|
pure virtual |
Declare a set of features to be used for selection (declare what documents to weight)
- Parameters
-
| [in] | set_ | name of the set of the selecting feature. |
| virtual void strus::QueryEvalInterface::addSummarizerFunction |
( |
const std::string & |
functionName, |
|
|
SummarizerFunctionInstanceInterface * |
function, |
|
|
const std::vector< FeatureParameter > & |
featureParameters, |
|
|
const std::string & |
debugAttributeName = std::string() |
|
) |
| |
|
pure virtual |
Declare a summarizer function to use for this query evaluation scheme.
- Parameters
-
| [in] | functionName | name of the summarizer function (no meaning, just for inspection and tracing) |
| [in] | function | parameterized summarizer function to use (ownership passed to this). The function instance can be constructed by getting the function by name from the query processor and parameterizing a created instance of it. |
| [in] | featureParameters | list of parameters adressing query features that are subject of sumarization |
| [in] | debugAttributeName | (optional) name of the attribute the debug info is attached to if debug mode is switched on in query (empty if no debug info should be provided in any case) |
| virtual void strus::QueryEvalInterface::addTerm |
( |
const std::string & |
set_, |
|
|
const std::string & |
type_, |
|
|
const std::string & |
value_ |
|
) |
| |
|
pure virtual |
Declare a predefined term for all queries of this type.
- Parameters
-
| [in] | set_ | name of the set of this term. The set is the identifier to address a group of terms. It declares the role of the term in the query |
| [in] | type_ | name of the type of the term |
| [in] | value_ | value of the term |
- Note
- This function is useful to define structural elements in the document used for query evaluation, that are not part of the query itself. For example sentence or paragraph marker.
| virtual void strus::QueryEvalInterface::addWeightingFunction |
( |
const std::string & |
functionName, |
|
|
WeightingFunctionInstanceInterface * |
function, |
|
|
const std::vector< FeatureParameter > & |
featureParameters, |
|
|
const std::string & |
debugAttributeName = std::string() |
|
) |
| |
|
pure virtual |
Declare a weighting function to use for this query evaluation scheme.
- Parameters
-
| [in] | functionName | name of the weighting function (no meaning, just for inspection and tracing) |
| [in] | function | parameterized weighting function to use (ownership passed to this). The function instance can be constructed by getting the function by name from the query processor and parameterizing a created instance of it. |
| [in] | featureParameters | list of parameters adressing query features that are subject of weighting |
| [in] | debugAttributeName | (optional) name of the attribute the debug info is attached to if debug mode is switched on in query (empty if no debug info should be provided in any case) |
Create a new query.
- Parameters
-
| [in] | storage | storage to run the query on |
- Returns
- a query instance for this query evaluation type
Declare the scalar function to combine the weighting functions declared.
- Parameters
-
| [in] | combinefunc | scalar function (passed ownership) for combining the weighting functions defined to one value |
| virtual std::vector<std::string> strus::QueryEvalInterface::getExclusionFeatureSets |
( |
| ) |
const |
|
pure virtual |
Get the set names of features to be used as exclusion (exclude documents that contain a feature of the set declared)
- Returns
- the list of all exclusion feature set names declared
| virtual std::vector<std::string> strus::QueryEvalInterface::getRestrictionFeatureSets |
( |
| ) |
const |
|
pure virtual |
Get the set names of features to be used as restriction (exclude documents that do not contain a feature of the set declared)
- Returns
- the list of all restriction feature set names declared
| virtual std::vector<std::string> strus::QueryEvalInterface::getSelectionFeatureSets |
( |
| ) |
const |
|
pure virtual |
Define a set of features to be used as selection (declare what documents to weight)
- Returns
- the list of all selecting feature set names declared
| virtual std::vector<std::string> strus::QueryEvalInterface::getWeightingFeatureSets |
( |
| ) |
const |
|
pure virtual |
Define a set of features to be used for weighting.
- Returns
- the list of all weighting feature set names declared
The documentation for this class was generated from the following file: