xapian-core
1.4.26
|
test database contents and consistency. More...
Go to the source code of this file.
Functions | |
string | positions_to_string (Xapian::PositionIterator &it, const Xapian::PositionIterator &end, Xapian::termcount *count) |
Convert the list of positions in a positionlist to a string. More... | |
string | postlist_to_string (const Xapian::Database &db, const string &tname) |
Convert the list of postings in a postlist to a string. More... | |
string | docterms_to_string (const Xapian::Database &db, Xapian::docid did) |
Convert the list of terms in a document to a string. More... | |
string | docstats_to_string (const Xapian::Database &db, Xapian::docid did) |
Convert statistics about a document to a string. More... | |
string | termstats_to_string (const Xapian::Database &db, const string &term) |
Convert statistics about a term to a string. More... | |
void | dbcheck (const Xapian::Database &db, Xapian::doccount expected_doccount, Xapian::docid expected_lastdocid) |
Check consistency of database and statistics. More... | |
test database contents and consistency.
Definition in file dbcheck.cc.
void dbcheck | ( | const Xapian::Database & | db, |
Xapian::doccount | expected_doccount, | ||
Xapian::docid | expected_lastdocid | ||
) |
Check consistency of database and statistics.
Raises a TestFail exception if the database is inconsistent.
Definition at line 126 of file dbcheck.cc.
References Xapian::Database::allterms_begin(), Xapian::Database::allterms_end(), Xapian::Database::get_avlength(), Xapian::Database::get_collection_freq(), Xapian::Database::get_doccount(), Xapian::Database::get_doclength(), Xapian::Database::get_doclength_lower_bound(), Xapian::Database::get_doclength_upper_bound(), Xapian::Database::get_document(), Xapian::Database::get_lastdocid(), Xapian::TermIterator::get_termfreq(), Xapian::Database::get_termfreq(), Xapian::Database::get_unique_terms(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), Xapian::TermIterator::get_wdf(), Xapian::Database::get_wdf_upper_bound(), Xapian::TermIterator::positionlist_begin(), Xapian::TermIterator::positionlist_count(), Xapian::TermIterator::positionlist_end(), positions_to_string(), Xapian::Database::postlist_begin(), Xapian::Database::postlist_end(), Xapian::Internal::str(), Xapian::Database::term_exists(), Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST, TEST_EQUAL, TEST_EQUAL_DOUBLE, TEST_REL, Xapian::Database::valuestream_begin(), and Xapian::Database::valuestream_end().
Referenced by check_equal_dbs(), and DEFINE_TESTCASE().
string docstats_to_string | ( | const Xapian::Database & | db, |
Xapian::docid | did | ||
) |
Convert statistics about a document to a string.
Definition at line 105 of file dbcheck.cc.
References Xapian::Database::get_doclength(), and Xapian::Internal::str().
Referenced by DEFINE_TESTCASE().
string docterms_to_string | ( | const Xapian::Database & | db, |
Xapian::docid | did | ||
) |
Convert the list of terms in a document to a string.
This will include positional information when such information is present.
Definition at line 82 of file dbcheck.cc.
References positions_to_string(), Xapian::Internal::str(), Xapian::Database::termlist_begin(), and Xapian::Database::termlist_end().
Referenced by DEFINE_TESTCASE().
string positions_to_string | ( | Xapian::PositionIterator & | it, |
const Xapian::PositionIterator & | end, | ||
Xapian::termcount * | count = NULL |
||
) |
Convert the list of positions in a positionlist to a string.
it | The start iterator for the positionlist. This will be moved. |
end | The end iterator for the positionlist. |
count | If not NULL, a pointer to a value which will be set to the number of positions found. |
Definition at line 33 of file dbcheck.cc.
References Xapian::Internal::str().
Referenced by dbcheck(), docterms_to_string(), and postlist_to_string().
string postlist_to_string | ( | const Xapian::Database & | db, |
const std::string & | tname | ||
) |
Convert the list of postings in a postlist to a string.
This will include positional information when such information is present.
Definition at line 55 of file dbcheck.cc.
References positions_to_string(), Xapian::Database::postlist_begin(), Xapian::Database::postlist_end(), and Xapian::Internal::str().
Referenced by check_equal_dbs(), and DEFINE_TESTCASE().
string termstats_to_string | ( | const Xapian::Database & | db, |
const string & | term | ||
) |
Convert statistics about a term to a string.
Definition at line 115 of file dbcheck.cc.
References Xapian::Database::get_collection_freq(), Xapian::Database::get_termfreq(), and Xapian::Internal::str().
Referenced by DEFINE_TESTCASE().