172 SKIP_TEST(
"Metadata not supported by this backend");
289 string longitem(20000,
'j');
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
#define SKIP_TEST_FOR_BACKEND(B)
An indexed database of documents.
Xapian::TermIterator metadata_keys_begin(std::string_view prefix={}) const
An iterator which returns all user-specified metadata keys.
Xapian::TermIterator metadata_keys_end(std::string_view={}) const noexcept
End iterator corresponding to metadata_keys_begin().
Xapian::doccount get_doccount() const
Get the number of documents in the database.
bool reopen()
Reopen the database at the latest available revision.
std::string get_metadata(std::string_view key) const
Get the user-specified metadata associated with a given key.
Class representing a document.
void add_posting(std::string_view term, Xapian::termpos term_pos, Xapian::termcount wdf_inc=1)
Add a posting for a term.
InvalidArgumentError indicates an invalid parameter value was passed to the API.
Class for iterating over a list of terms.
void skip_to(std::string_view term)
Advance the iterator to term term.
UnimplementedError indicates an attempt to use an unimplemented feature.
This class provides read/write access to a database.
void set_metadata(std::string_view key, std::string_view metadata)
Set the user-specified metadata associated with a given key.
void commit()
Commit pending modifications.
Xapian::docid add_document(const Xapian::Document &doc)
Add a document to the database.
#define TEST_REL(A, REL, B)
Test a relation holds,e.g. TEST_REL(a,>,b);.
a generic test suite engine
#define SKIP_TEST(MSG)
Skip the current testcase with message MSG.
#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.
#define TEST_EXCEPTION(TYPE, CODE)
Check that CODE throws exactly Xapian exception TYPE.
Public interfaces for the Xapian library.