33 map<Xapian::valueno, ValueList *>::const_iterator i;
34 for (i = valuelists.begin(); i != valuelists.end(); ++i) {
51 current = unsigned(n);
53 auto multidb =
static_cast<MultiDatabase*
>(db.internal.get());
54 database = multidb->
shards[n];
63 pair<map<Xapian::valueno, ValueList *>::iterator,
bool> ret;
64 ret = valuelists.insert(make_pair(slot,
static_cast<ValueList*
>(NULL)));
68 vl = database->open_value_list(slot);
69 ret.first->second = vl;
71 vl = ret.first->second;
80 ret.first->second = NULL;
93 doc = database->open_document(did,
true);
95 doc->fetch_all_values(v);
102 doc = database->open_document(did,
true);
104 return doc->fetch_data();
Sharded database backend.
Xapian::SmallVectorI< Xapian::Database::Internal > shards
void fetch_all_values(std::map< Xapian::valueno, std::string > &values_) const
Implementation of virtual methods.
std::string fetch_value(Xapian::valueno slot) const
Implementation of virtual methods.
std::string fetch_data() const
Implementation of virtual methods.
void new_shard(Xapian::doccount n)
Abstract base class for value streams.
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 bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
virtual std::string get_value() const =0
Return the value at the current position.
Sharded database backend.
unsigned valueno
The number for a value slot in a document.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Various assertion macros.
#define AssertRel(A, REL, B)
static void clear_valuelists(map< Xapian::valueno, ValueList * > &valuelists)
A document which gets its values from a ValueStreamManager.