19 #ifndef XAPIAN_INCLUDED_RSETINTERNAL_H
20 #define XAPIAN_INCLUDED_RSETINTERNAL_H
36 std::set<Xapian::docid>
docs;
39 if (n_shards == 1 ||
docs.empty()) {
44 rsets.resize(n_shards,
RSet(
this));
50 rsets.reserve(n_shards);
52 rsets.emplace_back(
RSet());
55 for (
auto&& did :
docs) {
57 rsets[
shard_number(did, n_shards)].add_document(shard_did);
Base class for objects managed by intrusive_ptr.
std::set< Xapian::docid > docs
void shard(Xapian::doccount n_shards, std::vector< Xapian::RSet > &rsets)
RSet()
Default constructor.
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.
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Set of documents judged as relevant.