strusPython  0.14
Classes | Public Member Functions | Friends | List of all members
strus::QueryExpression Class Reference

Object representing a sequence of query operations to get the set of postings (d,p) of an atomic term or an expression. More...

#include <bindingObjects.hpp>

Public Member Functions

 QueryExpression (const QueryExpression &o)
 
 QueryExpression ()
 
void pushTerm (const String &type_, const String &value_, const Index &length_)
 Add operation "Push a single term on the stack". More...
 
void pushDocField (const String &metadata_start_, const String &metadata_end_)
 Add operation "Push a single document field specification on the stack". More...
 
void pushExpression (const String &opname_, unsigned int argc_, int range_=0, unsigned int cardinality_=0)
 Add operation "Create an expression from the topmost 'argc' elements of the stack, pop them from the stack and push the expression as single unit on the stack". More...
 
void attachVariable (const String &name_)
 Add operation "Attach a variable to the top expression or term on the query stack". More...
 
void add (const QueryExpression &o)
 Appends the operations of 'o' to this. More...
 
std::size_t size () const
 Get the number of items (sub expressions) on the stack as result of this expression. More...
 

Friends

class Query
 

Detailed Description

Object representing a sequence of query operations to get the set of postings (d,p) of an atomic term or an expression.

Constructor & Destructor Documentation

strus::QueryExpression::QueryExpression ( const QueryExpression o)
inline
strus::QueryExpression::QueryExpression ( )
inline

Member Function Documentation

void strus::QueryExpression::add ( const QueryExpression o)

Appends the operations of 'o' to this.

Parameters
[in]oexpression to copy
void strus::QueryExpression::attachVariable ( const String &  name_)

Add operation "Attach a variable to the top expression or term on the query stack".

Note
The positions of the query matches of the referenced term or expression can be accessed through this variable in summarization.
Parameters
[in]name_name of the variable attached
Remarks
The stack is not changed
void strus::QueryExpression::pushDocField ( const String &  metadata_start_,
const String &  metadata_end_ 
)

Add operation "Push a single document field specification on the stack".

Parameters
[in]metadata_start_name of meta data element that defines the start of the document field, assumed as 1 if name is empty
[in]metadata_end_name of meta data element that defines the end of the document field, assumed as max value if name is empty
void strus::QueryExpression::pushExpression ( const String &  opname_,
unsigned int  argc_,
int  range_ = 0,
unsigned int  cardinality_ = 0 
)

Add operation "Create an expression from the topmost 'argc' elements of the stack, pop them from the stack and push the expression as single unit on the stack".

Parameters
[in]opname_name of the expression operator
[in]argc_number of operands (topmost elements from stack) of the expression
[in]range_range number for the expression span in the document
[in]cardinality_number that specifies the minimum size of a subset or subset permutation to match
void strus::QueryExpression::pushTerm ( const String &  type_,
const String &  value_,
const Index length_ 
)

Add operation "Push a single term on the stack".

Parameters
[in]type_query term type name
[in]value_query term value
[in]length_length of the feature (ordinal position count)
std::size_t strus::QueryExpression::size ( ) const
inline

Get the number of items (sub expressions) on the stack as result of this expression.

Returns
the number of items (sub expressions)

Friends And Related Function Documentation

friend class Query
friend

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