10 #ifndef _STRUS_STORAGE_CLIENT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_STORAGE_CLIENT_INTERFACE_HPP_INCLUDED
22 class PostingIteratorInterface;
24 class StructIteratorInterface;
26 class ForwardIteratorInterface;
28 class DocumentTermIteratorInterface;
30 class InvAclIteratorInterface;
32 class ValueIteratorInterface;
34 class StorageTransactionInterface;
36 class StorageDocumentInterface;
38 class StatisticsProcessorInterface;
40 class StatisticsIteratorInterface;
42 class MetaDataReaderInterface;
44 class MetaDataRestrictionInterface;
46 class AttributeReaderInterface;
48 class AclReaderInterface;
61 virtual std::string
config()
const=0;
71 const std::string& type,
72 const std::string& value,
73 const Index& length)
const=0;
80 const std::string& structstr)
const=0;
92 const Index& maxpos)
const=0;
102 const std::string& meta_fieldStart,
103 const std::string& meta_fieldEnd)
const=0;
110 const std::string& type)
const=0;
117 const std::string& type)
const=0;
125 const std::string& username)
const=0;
141 const std::string& type,
142 const std::string& term)
const=0;
197 const std::string& type)
const=0;
234 const std::string& docid,
235 const std::string& logfilename)
const=0;
240 virtual bool checkStorage( std::ostream& errorlog)
const=0;
246 virtual void close()=0;
Interface of a strus IR storage.
Definition: storageClientInterface.hpp:52
virtual StructIteratorInterface * createStructIterator(const std::string &structstr) const =0
Create an iterator on the structures (relations of ordinal position ranges) of a defined type...
virtual ValueIteratorInterface * createTermValueIterator() const =0
Create an iterator on the term value inserted.
virtual PostingIteratorInterface * createTermPostingIterator(const std::string &type, const std::string &value, const Index &length) const =0
Create an iterator on the occurrencies of a term in the storage.
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
virtual ValueIteratorInterface * createStructTypeIterator() const =0
Create an iterator on the structure types inserted.
virtual ValueIteratorInterface * createTermTypeIterator() const =0
Create an iterator on the term types inserted.
virtual Index documentStatistics(const Index &docno, const DocumentStatisticsType &stat, const std::string &type) const =0
Get one specified element of the documents statistics for a term type on the local server node...
Structure that represents relations of position info index ranges (directed graph) per document...
Definition: structIteratorInterface.hpp:20
virtual bool isForwardIndexTerm(const std::string &type) const =0
Evaluate if there exists forward index blocks for this type.
virtual const StatisticsProcessorInterface * getStatisticsProcessor() const =0
Get the processing message interface for introspecting and packing messages outside the queue context...
Numeric types used for local and global indices.
Object to declare all items for one insert/replace of a document in the storage.
Definition: storageDocumentInterface.hpp:21
Interface for accessing document attributes from a strus storage.
Definition: aclReaderInterface.hpp:20
DocumentStatisticsType
Enumeration of document statistics.
Definition: storageClientInterface.hpp:184
Structure that represents a set of strings as iterator.
Definition: valueIteratorInterface.hpp:21
Object to declare all items for one insert/update of a document in the storage.
Definition: storageTransactionInterface.hpp:26
virtual Index termTypeNumber(const std::string &type) const =0
Get the local internal term type number.
virtual StatisticsIteratorInterface * createAllStatisticsIterator(bool sign=true)=0
Creates an iterator on storage statistics messages for initialization/deregistration.
virtual MetaDataReaderInterface * createMetaDataReader() const =0
Create an interface to access items of document metadata.
virtual bool checkStorage(std::ostream &errorlog) const =0
Iterate through all key/value pairs and check their data for validity.
virtual Index nofDocumentsInserted() const =0
Get the number of documents inserted in this storage instance.
Interface for accessing document attributes from a strus storage.
Definition: attributeReaderInterface.hpp:20
Iterator of sets of documents used to implement ACL access restrictions.
Definition: invAclIteratorInterface.hpp:18
virtual ValueIteratorInterface * createUserNameIterator() const =0
Create an iterator on the user names used in document access restrictions.
virtual InvAclIteratorInterface * createInvAclIterator(const std::string &username) const =0
Create a an iterator on the numbers of documents a specified user is allowed to see.
number of accumulated dfs (number of terms)
Definition: storageClientInterface.hpp:187
Structure that represents a set of feature occurrencies (postings) as iterator.
Definition: postingIteratorInterface.hpp:20
virtual ForwardIteratorInterface * createForwardIterator(const std::string &type) const =0
Create a viewer to inspect the term stored values with the forward index of the storage.
virtual StorageDocumentInterface * createDocumentChecker(const std::string &docid, const std::string &logfilename) const =0
Create an interface to verify, if the contents of a document are inserted correctly into the storage...
virtual PostingIteratorInterface * createFieldPostingIterator(const std::string &meta_fieldStart, const std::string &meta_fieldEnd) const =0
Create an iterator postings specified as field in the meta data (by start and end position) ...
virtual PostingIteratorInterface * createBrowsePostingIterator(const MetaDataRestrictionInterface *restriction, const Index &maxpos) const =0
Create an iterator on all enumerable postings of document selected by a metadata restriction.
virtual ValueIteratorInterface * createDocIdIterator() const =0
Create an iterator on the document identifiers inserted.
Structure that allows to iterate on document term occurrencies.
Definition: documentTermIteratorInterface.hpp:21
number of distinct terms
Definition: storageClientInterface.hpp:186
virtual std::string config() const =0
Get the interpreted configuration this storage client was created with.
virtual MetaDataRestrictionInterface * createMetaDataRestriction() const =0
Create an object for restrictions on metadata.
virtual Index maxDocumentNumber() const =0
Get the highest document number used in this stogage.
virtual StatisticsIteratorInterface * createChangeStatisticsIterator()=0
Creates an iterator on the storage statistics messages created by updates of this storage...
virtual Index documentFrequency(const std::string &type, const std::string &term) const =0
Get the local document frequency of a feature in this storage instance.
Interface for an iterator on statistics.
Definition: statisticsIteratorInterface.hpp:18
virtual AttributeReaderInterface * createAttributeReader() const =0
Create an interface to access attributes attached to documents for representation.
virtual StorageTransactionInterface * createTransaction()=0
Create an insert/update transaction object.
virtual DocumentTermIteratorInterface * createDocumentTermIterator(const std::string &type) const =0
Create an iterator on term occurrencies in documents (support for feature selection) ...
virtual AclReaderInterface * createAclReader() const =0
Create a an iterator on the access control lists of documents.
virtual Index documentNumber(const std::string &docid) const =0
Get the local internal document number.
Interface for packing/unpacking messages with statistics used for query evaluation.
Definition: statisticsProcessorInterface.hpp:24
Iterator on the forward index mapping occurrencies to the terms inserted.
Definition: forwardIteratorInterface.hpp:19
virtual ~StorageClientInterface()
Destructor.
Definition: storageClientInterface.hpp:57
virtual void close()=0
Close client connection and eventually do some cleanup.