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

Object to declare all items for one insert/replace of a document in the storage. More...

#include <storageDocumentInterface.hpp>

Public Member Functions

virtual ~StorageDocumentInterface ()
 Destructor. More...
 
virtual void addSearchIndexTerm (const std::string &type_, const std::string &value_, const Index &position_)=0
 Add one occurrence of a term in the document for retrieval. More...
 
virtual void addSearchIndexStructure (const std::string &struct_, const IndexRange &source_, const IndexRange &sink_)=0
 Add a structure (relation of ordinal position ranges) in the the document for retrieval. More...
 
virtual void addForwardIndexTerm (const std::string &type_, const std::string &value_, const Index &position_)=0
 Add one occurrence of a term to the forward index for summarization of the document. More...
 
virtual void setMetaData (const std::string &name_, const NumericVariant &value_)=0
 Define a meta data element of the document by name. More...
 
virtual void setAttribute (const std::string &name_, const std::string &value_)=0
 Define a string attribute of the document. More...
 
virtual void setUserAccessRight (const std::string &username_)=0
 Allow a user to access the document. More...
 
virtual void done ()=0
 Closing the document definition. More...
 

Detailed Description

Object to declare all items for one insert/replace of a document in the storage.

Constructor & Destructor Documentation

virtual strus::StorageDocumentInterface::~StorageDocumentInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::StorageDocumentInterface::addForwardIndexTerm ( const std::string &  type_,
const std::string &  value_,
const Index position_ 
)
pure virtual

Add one occurrence of a term to the forward index for summarization of the document.

Parameters
[in]type_type name of the term
[in]value_value string of the term
[in]position_position of the term in the document
Remarks
Only one type,value pair allowed at one position
virtual void strus::StorageDocumentInterface::addSearchIndexStructure ( const std::string &  struct_,
const IndexRange source_,
const IndexRange sink_ 
)
pure virtual

Add a structure (relation of ordinal position ranges) in the the document for retrieval.

Parameters
[in]struct_structure type name
[in]source_position range of the relation source in the document
[in]sink_position range of the relation sink in the document
Remarks
Source index ranges must not overlap, sink index ranges must not overlap
virtual void strus::StorageDocumentInterface::addSearchIndexTerm ( const std::string &  type_,
const std::string &  value_,
const Index position_ 
)
pure virtual

Add one occurrence of a term in the document for retrieval.

Parameters
[in]type_type name of the term
[in]value_value string of the term
[in]position_position of the term in the document
virtual void strus::StorageDocumentInterface::done ( )
pure virtual

Closing the document definition.

virtual void strus::StorageDocumentInterface::setAttribute ( const std::string &  name_,
const std::string &  value_ 
)
pure virtual

Define a string attribute of the document.

Note
Attributes are used for summarization in a query result
Parameters
[in]name_name of the attribute
[in]value_value of the document attribute
virtual void strus::StorageDocumentInterface::setMetaData ( const std::string &  name_,
const NumericVariant &  value_ 
)
pure virtual

Define a meta data element of the document by name.

Note
Meta data are used for query restrictions and for document weights in query result ranking
Document meta data have to be declared in advance when creating the storage or with an alter metadata table command when no clients are running on this storage.
Parameters
[in]name_name of the existing meta data element
[in]value_value of the element
virtual void strus::StorageDocumentInterface::setUserAccessRight ( const std::string &  username_)
pure virtual

Allow a user to access the document.

Parameters
[in]username_name of the user to allow access
Remarks
The access is only retriected for search, not for the admin interfaces for inspecting, deleting and updating a document
The access control is a very primitive implementation and just designed as filter in the search index.
Note
Adding no user means that nobody can search for the document if access control is enabled
The storage has to be created with "acl=yes" for enabling access control

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