strus  0.17
queryProcessorInterface.hpp
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 http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_QUERY_PROCESSOR_INTERFACE_HPP_INCLUDED
11 #define _STRUS_QUERY_PROCESSOR_INTERFACE_HPP_INCLUDED
16 #include <string>
17 #include <vector>
18 
19 namespace strus
20 {
22 class PostingIteratorInterface;
24 class AttributeReaderInterface;
25 
28 {
29 public:
32 
35  virtual std::string getResourceFilePath( const std::string& filename) const=0;
36 
40  virtual void
42  const std::string& name,
44 
48  virtual const PostingJoinOperatorInterface*
50  const std::string& name) const=0;
51 
55 
56  virtual void
58  const std::string& name,
60 
64  virtual const WeightingFunctionInterface*
66  const std::string& name) const=0;
67 
71  virtual void
73  const std::string& name,
74  SummarizerFunctionInterface* sumfunc)=0;
75 
79  virtual const SummarizerFunctionInterface*
81  const std::string& name) const=0;
82 
85  {
90  };
91 
95  virtual std::vector<std::string> getFunctionList( const FunctionType& type) const=0;
96 
100  virtual void
102  const std::string& name,
104 
108  virtual const ScalarFunctionParserInterface*
110  const std::string& name) const=0;
111 };
112 
113 }//namespace
114 #endif
115 
Interface for a scalar function parser.
FunctionType
Function type for fetching the list of available functions.
Definition: queryProcessorInterface.hpp:84
Addresses a parser for a language for arithmetic expression as string.
Definition: queryProcessorInterface.hpp:89
virtual const ScalarFunctionParserInterface * getScalarFunctionParser(const std::string &name) const =0
Get a scalar function parser reference by name.
Interface for parsing scalar function definitions.
Definition: scalarFunctionParserInterface.hpp:21
Addresses a posting iterator join operator.
Definition: queryProcessorInterface.hpp:86
virtual const SummarizerFunctionInterface * getSummarizerFunction(const std::string &name) const =0
Get a summarization function reference by name.
virtual ~QueryProcessorInterface()
Destructor.
Definition: queryProcessorInterface.hpp:31
Interface for summarization functions (additional info about the matches in the result ranklist of a ...
Definition: summarizerFunctionInterface.hpp:25
virtual const PostingJoinOperatorInterface * getPostingJoinOperator(const std::string &name) const =0
Get a join function reference defined by 'name'.
Interface for a function implementing a join of N posting sets and providing an posting iterator on t...
virtual std::string getResourceFilePath(const std::string &filename) const =0
Get the absolute path of a resource file.
Defines all object instances involved in query evaluation addressable by name.
Definition: queryProcessorInterface.hpp:27
virtual void defineSummarizerFunction(const std::string &name, SummarizerFunctionInterface *sumfunc)=0
Define a new summarization function.
virtual std::vector< std::string > getFunctionList(const FunctionType &type) const =0
Get a list of all functions of a specific type available.
Addresses a weighting function.
Definition: queryProcessorInterface.hpp:87
virtual void definePostingJoinOperator(const std::string &name, PostingJoinOperatorInterface *op)=0
Define a new posting set join operation.
Interface for a weighting function that can be used for ranking in the query evaluation.
Definition: weightingFunctionInterface.hpp:24
Interface for creating iterators on joined sets of postings.
Definition: postingJoinOperatorInterface.hpp:23
Interface for a weighting function type.
Addresses a summarization function.
Definition: queryProcessorInterface.hpp:88
Interface for a summarizer function type.
virtual const WeightingFunctionInterface * getWeightingFunction(const std::string &name) const =0
Get a weighting function reference by name.
virtual void defineScalarFunctionParser(const std::string &name, ScalarFunctionParserInterface *parser)=0
Define a function parser for scalar functions used in weighting or summarization. ...
virtual void defineWeightingFunction(const std::string &name, WeightingFunctionInterface *func)=0
Define a new weighting function.