84 if (db_w.
size() > 1) {
190 if (db_w.
size() > 1) {
272 size_t FLUSH_THRESHOLD = 10000;
276 FLUSH_THRESHOLD *= db_w.
size();
279 for (
size_t i = 0; i < FLUSH_THRESHOLD; ++i) {
DEFINE_TESTCASE(valuestats1, writable &&valuestats)
Test of value statistics methods.
Xapian::Database get_writable_database_as_database()
Xapian::WritableDatabase get_writable_database(const string &dbname)
Xapian::Database get_database(const string &dbname)
test functionality of the Xapian API
This class is used to access a database, or a group of databases.
std::string get_value_upper_bound(Xapian::valueno slot) const
Get an upper bound on the values stored in the given value slot.
size_t size() const
Return number of shards in this Database object.
std::string get_value_lower_bound(Xapian::valueno slot) const
Get a lower bound on the values stored in the given value slot.
Xapian::doccount get_doccount() const
Get the number of documents in the database.
Xapian::doccount get_value_freq(Xapian::valueno slot) const
Return the frequency of a given value slot.
bool reopen()
Re-open the database.
A handle representing a document in a Xapian database.
void add_value(Xapian::valueno slot, const std::string &value)
Add a new value.
ValueIterator values_begin() const
Iterator for the values in this document.
void remove_value(Xapian::valueno slot)
Remove any value with the given number.
ValueIterator values_end() const
Equivalent end iterator for values_begin().
Class for iterating over document values.
This class provides read/write access to a database.
void delete_document(Xapian::docid did)
Delete a document from the database.
void begin_transaction(bool flushed=true)
Begin a transaction.
void replace_document(Xapian::docid did, const Xapian::Document &document)
Replace a given document in the database.
void cancel_transaction()
Abort the transaction currently in progress, discarding the pending modifications made to the databas...
void commit()
Commit any pending modifications made to the database.
Xapian::docid add_document(const Xapian::Document &document)
Add a new document to the database.
a generic test suite engine
#define TEST_EQUAL(a, b)
Test for equality of two things.
#define TEST(a)
Test a condition, without an additional explanation for failure.
Xapian-specific test helper functions and macros.
Public interfaces for the Xapian library.