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

Defines a program for analyzing chunks of a query. More...

#include <queryAnalyzerInstanceInterface.hpp>

Public Member Functions

virtual ~QueryAnalyzerInstanceInterface ()
 Destructor. More...
 
virtual void addElement (const std::string &termtype, const std::string &fieldtype, TokenizerFunctionInstanceInterface *tokenizer, const std::vector< NormalizerFunctionInstanceInterface * > &normalizers, int priority)=0
 Declare an element to be retrieved from the search index. More...
 
virtual void addPatternLexem (const std::string &termtype, const std::string &fieldtype, TokenizerFunctionInstanceInterface *tokenizer, const std::vector< NormalizerFunctionInstanceInterface * > &normalizers, int priority)=0
 Declare an element to be used as lexem by post processing pattern matching but not put into the result of query analysis. More...
 
virtual void defineTokenPatternMatcher (const std::string &patternTypeName, PatternMatcherInstanceInterface *matcher, PatternTermFeederInstanceInterface *feeder)=0
 Declare a pattern matcher on the tokens after normalization (pattern lexems and query features) More...
 
virtual void defineContentPatternMatcher (const std::string &patternTypeName, PatternMatcherInstanceInterface *matcher, PatternLexerInstanceInterface *lexer, const std::vector< std::string > &selectexpr)=0
 Declare a pattern matcher on the content. More...
 
virtual void addElementFromPatternMatch (const std::string &type, const std::string &patternTypeName, const std::vector< NormalizerFunctionInstanceInterface * > &normalizers, int priority)=0
 Declare a feature to be searched for derived from a pattern matcher result item. More...
 
virtual std::vector< std::string > queryTermTypes () const =0
 Get the query term types declared in order of appearance in declarations return the query field types. More...
 
virtual std::vector< std::string > queryFieldTypes () const =0
 Get the query field types declared in order of appearance in declarations return the query field types. More...
 
virtual
QueryAnalyzerContextInterface
createContext () const =0
 Create the context used for analyzing a query. More...
 
virtual analyzer::QueryAnalyzerView view () const =0
 Return a structure with all definitions for introspection. More...
 

Detailed Description

Defines a program for analyzing chunks of a query.

Constructor & Destructor Documentation

virtual strus::QueryAnalyzerInstanceInterface::~QueryAnalyzerInstanceInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::QueryAnalyzerInstanceInterface::addElement ( const std::string &  termtype,
const std::string &  fieldtype,
TokenizerFunctionInstanceInterface tokenizer,
const std::vector< NormalizerFunctionInstanceInterface * > &  normalizers,
int  priority 
)
pure virtual

Declare an element to be retrieved from the search index.

Parameters
[in]termtypeterm type name of the feature
[in]fieldtypetype of the field of this element in the query
[in]tokenizertokenizer (ownership passed to this) to use for this feature
[in]normalizerslist of normalizers (element ownership passed to this) to use for this feature
[in]priorityelement priority analyzer element with lower priority are ousted if they are completely covered by elements with higher priority
virtual void strus::QueryAnalyzerInstanceInterface::addElementFromPatternMatch ( const std::string &  type,
const std::string &  patternTypeName,
const std::vector< NormalizerFunctionInstanceInterface * > &  normalizers,
int  priority 
)
pure virtual

Declare a feature to be searched for derived from a pattern matcher result item.

Parameters
[in]typetype name of the feature
[in]patternTypeNametype name of the pattern match result or result item
[in]normalizerslist of normalizers (element ownership passed to this) to use for this feature
[in]options(only for pre processing patterns) options that stear the document analysis result, e.g. influence the assingment of document position of terms produced
[in]priorityelement priority analyzer element with lower priority are ousted if they are completely covered by elements with higher priority
virtual void strus::QueryAnalyzerInstanceInterface::addPatternLexem ( const std::string &  termtype,
const std::string &  fieldtype,
TokenizerFunctionInstanceInterface tokenizer,
const std::vector< NormalizerFunctionInstanceInterface * > &  normalizers,
int  priority 
)
pure virtual

Declare an element to be used as lexem by post processing pattern matching but not put into the result of query analysis.

Parameters
[in]termtypeterm type name of the lexem to be feed to the pattern matching
[in]fieldtypetype of the field of this element in the query
[in]tokenizertokenizer (ownership passed to this) to use for this feature
[in]normalizerslist of normalizers (element ownership passed to this) to use for this feature
[in]priorityelement priority analyzer element with lower priority are ousted if they are completely covered by elements with higher priority
virtual QueryAnalyzerContextInterface* strus::QueryAnalyzerInstanceInterface::createContext ( ) const
pure virtual

Create the context used for analyzing a query.

Returns
the query analyzer context (with ownership)
virtual void strus::QueryAnalyzerInstanceInterface::defineContentPatternMatcher ( const std::string &  patternTypeName,
PatternMatcherInstanceInterface matcher,
PatternLexerInstanceInterface lexer,
const std::vector< std::string > &  selectexpr 
)
pure virtual

Declare a pattern matcher on the content.

Parameters
[in]patternTypeNamename of the type to assign to the pattern matching results
[in]matcherpattern matcher compiled (ownership passed to this)
[in]lexerlexer that tokenizes a document segment as input of pattern matching (ownership passed to this)
[in]selectexprlist of selection expressions as input of the pattern matching
virtual void strus::QueryAnalyzerInstanceInterface::defineTokenPatternMatcher ( const std::string &  patternTypeName,
PatternMatcherInstanceInterface matcher,
PatternTermFeederInstanceInterface feeder 
)
pure virtual

Declare a pattern matcher on the tokens after normalization (pattern lexems and query features)

Parameters
[in]patternTypeNamename of the type to assign to the pattern matching results
[in]matcherpattern matcher compiled (ownership passed to this)
[in]feederfeeder that maps document analysis term to pattern lexems as input of the matcher (ownership passed to this)
virtual std::vector<std::string> strus::QueryAnalyzerInstanceInterface::queryFieldTypes ( ) const
pure virtual

Get the query field types declared in order of appearance in declarations return the query field types.

virtual std::vector<std::string> strus::QueryAnalyzerInstanceInterface::queryTermTypes ( ) const
pure virtual

Get the query term types declared in order of appearance in declarations return the query field types.

virtual analyzer::QueryAnalyzerView strus::QueryAnalyzerInstanceInterface::view ( ) const
pure virtual

Return a structure with all definitions for introspection.

Returns
the structure with all definitions for introspection

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