strusAnalyzer  0.17
queryAnalyzerContextInterface.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_ANALYZER_QUERY_ANALYZER_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ANALYZER_QUERY_ANALYZER_CONTEXT_INTERFACE_HPP_INCLUDED
13 #include <vector>
14 #include <string>
15 
17 namespace strus
18 {
19 
22 {
23 public:
26 
31  virtual void putField( int fieldno, const std::string& fieldtype, const std::string& content)=0;
32 
34  enum GroupBy
35  {
40  };
41 
48  virtual void groupElements( int groupid, const std::vector<int>& fieldnoList, const GroupBy& groupBy, bool groupSingle)=0;
49 
53 };
54 
55 }//namespace
56 #endif
57 
GroupBy
Descriptor that tells how to group elements together.
Definition: queryAnalyzerContextInterface.hpp:34
virtual void putField(int fieldno, const std::string &fieldtype, const std::string &content)=0
Feed the analyzer with the a field of the query.
virtual void groupElements(int groupid, const std::vector< int > &fieldnoList, const GroupBy &groupBy, bool groupSingle)=0
Group elements of the query together.
virtual ~QueryAnalyzerContextInterface()
Destructor.
Definition: queryAnalyzerContextInterface.hpp:25
Elements with same position are grouped together.
Definition: queryAnalyzerContextInterface.hpp:36
Defines the context for analyzing queries for the strus IR engine.
Definition: queryAnalyzerContextInterface.hpp:21
Every element gets its own group.
Definition: queryAnalyzerContextInterface.hpp:37
Single element grouped and the element must exist.
Definition: queryAnalyzerContextInterface.hpp:39
All elements are grouped together.
Definition: queryAnalyzerContextInterface.hpp:38
virtual analyzer::QueryTermExpression analyze()=0
Analyze the term expression feeded with putField(unsigned int,const std::string&,const std::string&) ...
Expression of a query terms as result of a query analysis.
Definition: queryTermExpression.hpp:22