strus  0.17
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at
7  */
13 #include <string>
15 namespace strus
16 {
18 class WeightingFunctionContextInterface;
20 class NumericVariant;
22 class StorageClientInterface;
24 class MetaDataReaderInterface;
26 class PostingIteratorInterface;
30 {
31 public:
38  virtual void addStringParameter( const std::string& name, const std::string& value)=0;
43  virtual void addNumericParameter( const std::string& name, const NumericVariant& value)=0;
51  const StorageClientInterface* storage_,
52  MetaDataReaderInterface* metadata_,
53  const GlobalStatistics& stats) const=0;
57  virtual std::vector<std::string> getVariables() const=0;
61  virtual std::string tostring() const=0;
62 };
64 }//namespace
65 #endif
Interface of a strus IR storage.
Definition: storageClientInterface.hpp:52
virtual WeightingFunctionContextInterface * createFunctionContext(const StorageClientInterface *storage_, MetaDataReaderInterface *metadata_, const GlobalStatistics &stats) const =0
Create an execution context for this weighting function instance.
virtual std::vector< std::string > getVariables() const =0
Get the list of variables used by this function defined in the query with 'QueryInterface::setWeighti...
Interface for a parameterized weighting function instance.
Definition: weightingFunctionInstanceInterface.hpp:29
virtual void addNumericParameter(const std::string &name, const NumericVariant &value)=0
Add a named numeric value parameter.
Interface for a weighting function with its state and context used during calculation.
Definition: weightingFunctionContextInterface.hpp:24
Interface for accessing meta data from a strus storage.
Definition: metaDataReaderInterface.hpp:24
virtual void addStringParameter(const std::string &name, const std::string &value)=0
Add a named string value parameter.
virtual ~WeightingFunctionInstanceInterface()
Definition: weightingFunctionInstanceInterface.hpp:33
Global document statistics, if passed down with the query.
Definition: globalStatistics.hpp:16
virtual std::string tostring() const =0
Get a comma ',' separated list of the function parameters as assignments (e.g. name=value) ...