strusAnalyzer  0.17
Public Types | Public Member Functions | List of all members
strus::QueryAnalyzerContextInterface Class Referenceabstract

Defines the context for analyzing queries for the strus IR engine. More...

#include <queryAnalyzerContextInterface.hpp>

Public Types

enum  GroupBy { GroupByPosition, GroupEvery, GroupAll, GroupUnique }
 Descriptor that tells how to group elements together. More...
 

Public Member Functions

virtual ~QueryAnalyzerContextInterface ()
 Destructor. More...
 
virtual void putField (int fieldno, const std::string &fieldtype, const std::string &content)=0
 Feed the analyzer with the a field of the query. More...
 
virtual void groupElements (int groupid, const std::vector< int > &fieldnoList, const GroupBy &groupBy, bool groupSingle)=0
 Group elements of the query together. More...
 
virtual
analyzer::QueryTermExpression 
analyze ()=0
 Analyze the term expression feeded with putField(unsigned int,const std::string&,const std::string&) and groupElements(const std::string&,const std::vector<unsigned int>&,const GroupBy&) More...
 

Detailed Description

Defines the context for analyzing queries for the strus IR engine.

Member Enumeration Documentation

Descriptor that tells how to group elements together.

Enumerator
GroupByPosition 

Elements with same position are grouped together.

GroupEvery 

Every element gets its own group.

GroupAll 

All elements are grouped together.

GroupUnique 

Single element grouped and the element must exist.

Constructor & Destructor Documentation

virtual strus::QueryAnalyzerContextInterface::~QueryAnalyzerContextInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual analyzer::QueryTermExpression strus::QueryAnalyzerContextInterface::analyze ( )
pure virtual

Analyze the term expression feeded with putField(unsigned int,const std::string&,const std::string&) and groupElements(const std::string&,const std::vector<unsigned int>&,const GroupBy&)

Returns
the term expression structure
virtual void strus::QueryAnalyzerContextInterface::groupElements ( int  groupid,
const std::vector< int > &  fieldnoList,
const GroupBy groupBy,
bool  groupSingle 
)
pure virtual

Group elements of the query together.

Parameters
[in]groupididentifier of the grouping operation defined by the caller that gets into the resulting query as operator identifier of the query instructions
[in]fieldnolistnumber of the fields to take as arguments
[in]groupByhow to group elements together
[in]groupSingletrue, if this operator should also be applied on single elements, false, if the operator is not applied on single argument elements and the elements apear as they are
Note
This method influences how a query is iterated on
virtual void strus::QueryAnalyzerContextInterface::putField ( int  fieldno,
const std::string &  fieldtype,
const std::string &  content 
)
pure virtual

Feed the analyzer with the a field of the query.

Parameters
[in]fieldnonumber of the field
[in]fieldtypetype of the field
[in]contentcontent of the field

The documentation for this class was generated from the following file: