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

Implements browsing the documents of a storage without weighting query, just with a restriction on metadata. More...

#include <bindingObjects.hpp>

Public Member Functions

 DocumentBrowser (const DocumentBrowser &o)
 Copy constructor. More...
 
 ~DocumentBrowser ()
 Destructor. More...
 
void addMetaDataRestrictionCondition (const char *compareOp, const String &name, const Variant &value, bool newGroup)
 Define a meta data restriction condition on the documents visited. More...
 
void addMetaDataRestrictionCondition (const char *compareOp, const String &name, double value, bool newGroup)
 Define a meta data restriction condition on the documents visited. More...
 
void addMetaDataRestrictionCondition (const char *compareOp, const String &name, unsigned int value, bool newGroup)
 Define a meta data restriction condition on the documents visited. More...
 
void addMetaDataRestrictionCondition (const char *compareOp, const String &name, int value, bool newGroup)
 Define a meta data restriction condition on the documents visited. More...
 
Index skipDoc (const Index &docno_)
 Get the internal document number of the next document bigger or equal the document number passed. More...
 
String attribute (const String &name)
 Get an attribute of the current document visited. More...
 

Friends

class StorageClient
 

Detailed Description

Implements browsing the documents of a storage without weighting query, just with a restriction on metadata.

Constructor & Destructor Documentation

strus::DocumentBrowser::DocumentBrowser ( const DocumentBrowser o)

Copy constructor.

strus::DocumentBrowser::~DocumentBrowser ( )
inline

Destructor.

Member Function Documentation

void strus::DocumentBrowser::addMetaDataRestrictionCondition ( const char *  compareOp,
const String &  name,
const Variant value,
bool  newGroup 
)

Define a meta data restriction condition on the documents visited.

Parameters
[in]compareOpcompare operator, one of "=","!=",">=","<=","<",">"
[in]nameof the meta data field (left side of comparison operator)
[in]valuenumeric value to compare with the meta data field (right side of comparison operator)
[in]newGrouptrue, if the restriction is not an alternative condition to the previous one defined (alternative conditions are evaluated as logical OR)
Remarks
Metadata restrictions can only be defined before the first call of this DocumentBrowser::next()
void strus::DocumentBrowser::addMetaDataRestrictionCondition ( const char *  compareOp,
const String &  name,
double  value,
bool  newGroup 
)

Define a meta data restriction condition on the documents visited.

Parameters
[in]compareOpcompare operator, one of "=","!=",">=","<=","<",">"
[in]nameof the meta data field (left side of comparison operator)
[in]valuenumeric value to compare with the meta data field (right side of comparison operator)
[in]newGrouptrue, if the restriction is not an alternative condition to the previous one defined (alternative conditions are evaluated as logical OR)
Remarks
Metadata restrictions can only be defined before the first call of this DocumentBrowser::next()
void strus::DocumentBrowser::addMetaDataRestrictionCondition ( const char *  compareOp,
const String &  name,
unsigned int  value,
bool  newGroup 
)

Define a meta data restriction condition on the documents visited.

Parameters
[in]compareOpcompare operator, one of "=","!=",">=","<=","<",">"
[in]nameof the meta data field (left side of comparison operator)
[in]valuenumeric value to compare with the meta data field (right side of comparison operator)
[in]newGrouptrue, if the restriction is not an alternative condition to the previous one defined (alternative conditions are evaluated as logical OR)
Remarks
Metadata restrictions can only be defined before the first call of this DocumentBrowser::next()
void strus::DocumentBrowser::addMetaDataRestrictionCondition ( const char *  compareOp,
const String &  name,
int  value,
bool  newGroup 
)

Define a meta data restriction condition on the documents visited.

Parameters
[in]compareOpcompare operator, one of "=","!=",">=","<=","<",">"
[in]nameof the meta data field (left side of comparison operator)
[in]valuenumeric value to compare with the meta data field (right side of comparison operator)
[in]newGrouptrue, if the restriction is not an alternative condition to the previous one defined (alternative conditions are evaluated as logical OR)
Remarks
Metadata restrictions can only be defined before the first call of this DocumentBrowser::next()
String strus::DocumentBrowser::attribute ( const String &  name)

Get an attribute of the current document visited.

Returns
the internal document number or 0, if there is no one left
Index strus::DocumentBrowser::skipDoc ( const Index docno_)

Get the internal document number of the next document bigger or equal the document number passed.

Parameters
[in]docno_document number to get the matching least upperbound from
Returns
the internal document number

Friends And Related Function Documentation

friend class StorageClient
friend

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