21 #ifndef XAPIAN_INCLUDED_MULTI_VALUELIST_H
22 #define XAPIAN_INCLUDED_MULTI_VALUELIST_H
Class for merging ValueList objects from subdatabases.
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
std::string get_value() const
Return the value at the current position.
std::string get_description() const
Return a string description of this object.
Xapian::docid current_docid
Current docid (or 0 if we haven't started yet).
Xapian::valueno slot
The value slot we're iterating over.
MultiValueList(Xapian::doccount n_shards_, SubValueList **valuelists_, Xapian::valueno slot_)
Constructor.
Xapian::doccount count
Number of SubValueList* entries in valuelists.
Xapian::doccount n_shards
void next()
Advance the current position to the next document in the value stream.
void operator=(const MultiValueList &)
Don't allow assignment.
~MultiValueList()
Destructor.
SubValueList ** valuelists
Array of sub-valuelists which we use as a heap.
MultiValueList(const MultiValueList &)
Don't allow copying.
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::docid get_docid() const
Return the docid at the current position.
void skip_to(Xapian::docid)
Skip forward to the specified docid.
Abstract base class for value streams.
virtual void next()=0
Advance the current position to the next document in the value stream.
virtual Xapian::docid get_docid() const =0
Return the docid at the current position.
virtual bool at_end() const =0
Return true if the current position is past the last entry in this list.
virtual void skip_to(Xapian::docid)=0
Skip forward to the specified docid.
virtual std::string get_value() const =0
Return the value at the current position.
Virtual base class for Database internals.
Multi-database support functions.
Xapian::doccount shard_number(Xapian::docid did, Xapian::doccount n_shards)
Convert docid in the multi-db to shard number.
Xapian::docid shard_docid(Xapian::docid did, Xapian::doccount n_shards)
Convert docid in the multi-db to the docid in the shard.
Xapian::docid unshard(Xapian::docid shard_did, Xapian::doccount shard, Xapian::doccount n_shards)
Convert shard number and shard docid to docid in multi-db.
unsigned valueno
The number for a value slot in a document.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Xapian::docid get_docid() const
SubValueList(ValueList *vl, unsigned shard_)
Xapian::docid get_merged_docid(unsigned n_shards) const
void skip_to(Xapian::docid did, Xapian::doccount n_shards)
std::string get_value() const
Abstract base class for value streams.