|
xapian-core
2.0.0
|
tests which work with any backend More...
#include <config.h>#include "api_anydb.h"#include <algorithm>#include <string>#include <xapian.h>#include "testsuite.h"#include "testutils.h"#include "apitest.h"#include <list>
Include dependency graph for api_anydb.cc:Go to the source code of this file.
Classes | |
| class | EvenParityExpandFunctor |
Macros | |
| #define | XAPIAN_DEPRECATED(X) X |
Functions | |
| static void | print_mset_weights (const Xapian::MSet &mset) |
| static void | print_mset_percentages (const Xapian::MSet &mset) |
| static Xapian::Query | query (Xapian::Query::op op, const string &t1=string(), const string &t2=string(), const string &t3=string(), const string &t4=string(), const string &t5=string(), const string &t6=string(), const string &t7=string(), const string &t8=string(), const string &t9=string(), const string &t10=string()) |
| static Xapian::Query | query (Xapian::Query::op op, Xapian::termcount parameter, const string &t1=string(), const string &t2=string(), const string &t3=string(), const string &t4=string(), const string &t5=string(), const string &t6=string(), const string &t7=string(), const string &t8=string(), const string &t9=string(), const string &t10=string()) |
| static Xapian::Query | query (const string &t) |
| DEFINE_TESTCASE (zerodocid1, backend) | |
| DEFINE_TESTCASE (emptyquery1, backend) | |
| DEFINE_TESTCASE (simplequery1, backend) | |
| DEFINE_TESTCASE (simplequery2, backend) | |
| DEFINE_TESTCASE (simplequery3, backend) | |
| DEFINE_TESTCASE (multidb2, backend &&!multi) | |
| DEFINE_TESTCASE (msetmaxitems1, backend) | |
| DEFINE_TESTCASE (expandweights1, backend) | |
| DEFINE_TESTCASE (expandweights2, backend) | |
| DEFINE_TESTCASE (expandweights3, backend) | |
| DEFINE_TESTCASE (expandweights4, backend) | |
| DEFINE_TESTCASE (expandweights5, backend) | |
| DEFINE_TESTCASE (expandweights6, backend) | |
| DEFINE_TESTCASE (expandweights7, backend) | |
| DEFINE_TESTCASE (expandweights8, backend) | |
| DEFINE_TESTCASE (expandmaxitems1, backend) | |
| DEFINE_TESTCASE (boolquery1, backend) | |
| DEFINE_TESTCASE (msetfirst1, backend) | |
| DEFINE_TESTCASE (topercent1, backend) | |
| DEFINE_TESTCASE (topercent2, backend) | |
| DEFINE_TESTCASE (expandfunctor1, backend) | |
| DEFINE_TESTCASE (expanddeciderfilterprefix2, backend) | |
| DEFINE_TESTCASE (pctcutoff1, backend) | |
| DEFINE_TESTCASE (pctcutoff2, backend) | |
| DEFINE_TESTCASE (pctcutoff3, backend) | |
| DEFINE_TESTCASE (cutoff1, backend) | |
| DEFINE_TESTCASE (allowqterms1, backend) | |
| DEFINE_TESTCASE (maxattain1, backend) | |
| DEFINE_TESTCASE (reversebool1, backend) | |
| DEFINE_TESTCASE (reversebool2, backend) | |
| DEFINE_TESTCASE (getmterms1, backend) | |
| DEFINE_TESTCASE (getmterms2, backend) | |
| DEFINE_TESTCASE (repeatquery1, backend) | |
| DEFINE_TESTCASE (fetchdocs1, backend) | |
| DEFINE_TESTCASE (absentterm1, backend) | |
| DEFINE_TESTCASE (absentterm2, backend) | |
| DEFINE_TESTCASE (rset1, backend) | |
| DEFINE_TESTCASE (rset2, backend) | |
| Test that an RSet affects MSet result order. More... | |
| DEFINE_TESTCASE (rsetmultidb1, backend &&!multi) | |
| DEFINE_TESTCASE (rsetmultidb3, backend &&!multi) | |
| DEFINE_TESTCASE (eliteset1, backend &&!multi) | |
| Simple test of the elite set operator. More... | |
| DEFINE_TESTCASE (elitesetmulti1, multi) | |
| Multi-backend variant of eliteset1. More... | |
| DEFINE_TESTCASE (eliteset2, backend &&!multi) | |
| Test that the elite set operator works if the set contains sub-expressions (regression test) More... | |
| DEFINE_TESTCASE (elitesetmulti2, multi) | |
| Multi-backend variant of eliteset2. More... | |
| DEFINE_TESTCASE (eliteset3, backend) | |
| Test that elite set doesn't affect query results if we have fewer terms than the threshold. More... | |
| DEFINE_TESTCASE (eliteset4, backend &&!multi) | |
| Test that elite set doesn't pick terms with 0 frequency. More... | |
| DEFINE_TESTCASE (elitesetmulti4, multi) | |
| Multi-backend variant of eliteset4. More... | |
| DEFINE_TESTCASE (eliteset5, backend) | |
| Regression test for problem with excess precision. More... | |
| DEFINE_TESTCASE (termlisttermfreq1, backend) | |
| Test that the termfreq returned by termlists is correct. More... | |
| DEFINE_TESTCASE (qterminfo1, backend) | |
| Test the termfreq and termweight info returned for query terms. More... | |
| DEFINE_TESTCASE (qterminfo2, backend) | |
| Regression test for bug #37. More... | |
| DEFINE_TESTCASE (msetzeroitems1, backend) | |
| DEFINE_TESTCASE (matches1, backend) | |
| DEFINE_TESTCASE (wqf1, backend) | |
| DEFINE_TESTCASE (qlen1, backend) | |
| DEFINE_TESTCASE (termlist1, backend) | |
| DEFINE_TESTCASE (termlist2, backend) | |
| static Xapian::TermIterator | test_termlist3_helper () |
| DEFINE_TESTCASE (termlist3, backend) | |
| DEFINE_TESTCASE (termlist4, backend) | |
| DEFINE_TESTCASE (puncterms1, backend) | |
| DEFINE_TESTCASE (spaceterms1, backend) | |
| DEFINE_TESTCASE (xor1, backend) | |
| DEFINE_TESTCASE (xor2, backend) | |
| Test that weighted XOR queries work (bug fixed in 1.2.1 and 1.0.21). More... | |
| DEFINE_TESTCASE (getdoc1, backend) | |
| DEFINE_TESTCASE (emptyop1, backend) | |
| DEFINE_TESTCASE (checkatleast1, backend) | |
| DEFINE_TESTCASE (checkatleast2, backend) | |
| DEFINE_TESTCASE (checkatleast3, backend) | |
| DEFINE_TESTCASE (allpostlist1, backend) | |
| static void | test_emptyterm1_helper (Xapian::Database &db) |
| DEFINE_TESTCASE (emptyterm1, backend) | |
| DEFINE_TESTCASE (alldocspl1, backend) | |
| DEFINE_TESTCASE (alldocspl2, writable) | |
| DEFINE_TESTCASE (scaleweight1, backend) | |
| DEFINE_TESTCASE (scaleweight2, backend) | |
| DEFINE_TESTCASE (uuid1, backend &&!multi) | |
tests which work with any backend
Definition in file api_anydb.cc.
| #define XAPIAN_DEPRECATED | ( | X | ) | X |
Definition at line 32 of file api_anydb.cc.
| DEFINE_TESTCASE | ( | absentterm1 | , |
| backend | |||
| ) |
Definition at line 1061 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | absentterm2 | , |
| backend | |||
| ) |
Definition at line 1071 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, query(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | alldocspl1 | , |
| backend | |||
| ) |
Definition at line 2048 of file api_anydb.cc.
References Xapian::Document::add_value(), get_database(), Xapian::Database::postlist_begin(), Xapian::Database::postlist_end(), Xapian::WritableDatabase::replace_document(), Xapian::Document::set_data(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | alldocspl2 | , |
| writable | |||
| ) |
Definition at line 2068 of file api_anydb.cc.
References Xapian::Document::add_value(), Xapian::WritableDatabase::commit(), Xapian::WritableDatabase::delete_document(), Xapian::PostingIterator::get_doclength(), Xapian::PostingIterator::get_unique_terms(), Xapian::PostingIterator::get_wdf(), get_writable_database(), Xapian::Database::postlist_begin(), Xapian::Database::postlist_end(), Xapian::WritableDatabase::replace_document(), Xapian::Document::set_data(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | allowqterms1 | , |
| backend | |||
| ) |
Definition at line 829 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::begin(), Xapian::MSet::begin(), Xapian::ESet::end(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::INCLUDE_QUERY_TERMS, Xapian::Enquire::set_query(), Xapian::MSet::size(), term, TEST, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | allpostlist1 | , |
| backend | |||
| ) |
Definition at line 1998 of file api_anydb.cc.
References get_database(), Xapian::Database::postlist_begin(), Xapian::Database::postlist_end(), Xapian::PostingIterator::skip_to(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | boolquery1 | , |
| backend | |||
| ) |
Definition at line 441 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), Xapian::MSet::size(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | checkatleast1 | , |
| backend | |||
| ) |
Definition at line 1910 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::MSet::size(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | checkatleast2 | , |
| backend | |||
| ) |
Definition at line 1919 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_lower_bound(), Xapian::Enquire::get_mset(), Xapian::MSet::get_uncollapsed_matches_lower_bound(), Xapian::Enquire::set_query(), TEST_EQUAL, TEST_MSET_SIZE, and TEST_REL.
| DEFINE_TESTCASE | ( | checkatleast3 | , |
| backend | |||
| ) |
Definition at line 1937 of file api_anydb.cc.
References Xapian::Enquire::ASCENDING, Xapian::Enquire::DESCENDING, Xapian::Enquire::DONT_CARE, get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), Xapian::MSet::get_uncollapsed_matches_estimated(), Xapian::MSet::get_uncollapsed_matches_lower_bound(), Xapian::MSet::get_uncollapsed_matches_upper_bound(), Xapian::Enquire::set_docid_order(), Xapian::Enquire::set_query(), Xapian::Enquire::set_sort_by_relevance(), Xapian::Enquire::set_sort_by_relevance_then_value(), Xapian::Enquire::set_sort_by_value(), Xapian::Enquire::set_sort_by_value_then_relevance(), Heap::sort(), TEST_EQUAL, TEST_MSET_SIZE, and TEST_REL.
| DEFINE_TESTCASE | ( | cutoff1 | , |
| backend | |||
| ) |
Definition at line 778 of file api_anydb.cc.
References Xapian::MSet::back(), Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), Xapian::Query::OP_OR, print_mset_weights(), query(), Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_AND_EXPLAIN, tout, and verbose.
| DEFINE_TESTCASE | ( | eliteset1 | , |
| backend &&! | multi | ||
| ) |
Simple test of the elite set operator.
Definition at line 1172 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | eliteset2 | , |
| backend &&! | multi | ||
| ) |
Test that the elite set operator works if the set contains sub-expressions (regression test)
Definition at line 1220 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_ELITE_SET, query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | eliteset3 | , |
| backend | |||
| ) |
Test that elite set doesn't affect query results if we have fewer terms than the threshold.
Definition at line 1278 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::MSet::get_termfreq(), Xapian::MSet::get_termweight(), Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_OR, Xapian::Enquire::set_query(), stemmer, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | eliteset4 | , |
| backend &&! | multi | ||
| ) |
Test that elite set doesn't pick terms with 0 frequency.
Definition at line 1324 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_ELITE_SET, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | eliteset5 | , |
| backend | |||
| ) |
Regression test for problem with excess precision.
Definition at line 1375 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_SCALE_WEIGHT, and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | elitesetmulti1 | , |
| multi | |||
| ) |
Multi-backend variant of eliteset1.
Definition at line 1191 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_attained(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_ELITE_SET, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | elitesetmulti2 | , |
| multi | |||
| ) |
Multi-backend variant of eliteset2.
Definition at line 1242 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_attained(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_AND, Xapian::Query::OP_ELITE_SET, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | elitesetmulti4 | , |
| multi | |||
| ) |
Multi-backend variant of eliteset4.
Definition at line 1346 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_attained(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_ELITE_SET, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | emptyop1 | , |
| backend | |||
| ) |
Definition at line 1893 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_matching_terms_begin(), Xapian::Enquire::get_matching_terms_end(), Xapian::Enquire::get_mset(), Xapian::Query::OP_XOR, Xapian::Enquire::set_query(), TEST_EQUAL, and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | emptyquery1 | , |
| backend | |||
| ) |
Definition at line 140 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), Xapian::MSet::get_uncollapsed_matches_estimated(), Xapian::MSet::get_uncollapsed_matches_lower_bound(), Xapian::MSet::get_uncollapsed_matches_upper_bound(), Xapian::Query::OP_AND, Xapian::Enquire::set_query(), TEST_EQUAL, and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | emptyterm1 | , |
| backend | |||
| ) |
Definition at line 2033 of file api_anydb.cc.
References get_database(), Xapian::Database::get_doccount(), test_emptyterm1_helper(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | expanddeciderfilterprefix2 | , |
| backend | |||
| ) |
Definition at line 618 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::begin(), Xapian::MSet::begin(), Xapian::ESet::end(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::ESetIterator::get_weight(), Xapian::Enquire::set_query(), Xapian::ESet::size(), Xapian::MSet::size(), TEST, TEST_AND_EXPLAIN, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | expandfunctor1 | , |
| backend | |||
| ) |
Definition at line 559 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::begin(), Xapian::MSet::begin(), Xapian::ESet::end(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::ESetIterator::get_weight(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST, TEST_AND_EXPLAIN, TEST_EQUAL, tout, and verbose.
| DEFINE_TESTCASE | ( | expandmaxitems1 | , |
| backend | |||
| ) |
Definition at line 422 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), Xapian::MSet::size(), TEST, TEST_EQUAL, TEST_REL, and tout.
| DEFINE_TESTCASE | ( | expandweights1 | , |
| backend | |||
| ) |
Definition at line 238 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_expansion_scheme(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, TEST_REL, and Xapian::Enquire::USE_EXACT_TERMFREQ.
| DEFINE_TESTCASE | ( | expandweights2 | , |
| backend | |||
| ) |
Definition at line 267 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights3 | , |
| backend | |||
| ) |
Definition at line 290 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights4 | , |
| backend | |||
| ) |
Definition at line 314 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights5 | , |
| backend | |||
| ) |
Definition at line 334 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_expansion_scheme(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights6 | , |
| backend | |||
| ) |
Definition at line 356 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::ESet::get_ebound(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_expansion_scheme(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, TEST_REL, and Xapian::Enquire::USE_EXACT_TERMFREQ.
| DEFINE_TESTCASE | ( | expandweights7 | , |
| backend | |||
| ) |
Definition at line 388 of file api_anydb.cc.
References get_database(), Xapian::Enquire::set_expansion_scheme(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | expandweights8 | , |
| backend | |||
| ) |
Definition at line 396 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::back(), Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::ESetIterator::get_weight(), Xapian::Enquire::set_expansion_scheme(), Xapian::Enquire::set_query(), TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | fetchdocs1 | , |
| backend | |||
| ) |
Definition at line 1031 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), Xapian::MSet::fetch(), Xapian::Document::get_data(), get_database(), Xapian::MSetIterator::get_document(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | getdoc1 | , |
| backend | |||
| ) |
Definition at line 1876 of file api_anydb.cc.
References Xapian::Document::get_data(), get_database(), Xapian::Database::get_document(), Xapian::Document::set_data(), TEST_EQUAL, and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | getmterms1 | , |
| backend | |||
| ) |
Definition at line 962 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_matching_terms_begin(), Xapian::Enquire::get_matching_terms_end(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, Xapian::Enquire::set_query(), TEST, and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | getmterms2 | , |
| backend | |||
| ) |
Definition at line 991 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_matching_terms_begin(), Xapian::Enquire::get_matching_terms_end(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, Xapian::Enquire::set_query(), TEST, and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | matches1 | , |
| backend | |||
| ) |
Definition at line 1550 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), Xapian::MSet::get_uncollapsed_matches_estimated(), Xapian::MSet::get_uncollapsed_matches_lower_bound(), Xapian::MSet::get_uncollapsed_matches_upper_bound(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), Xapian::Database::size(), TEST_EQUAL, and TEST_REL.
| DEFINE_TESTCASE | ( | maxattain1 | , |
| backend | |||
| ) |
Definition at line 857 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::MSet::get_max_attained(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | msetfirst1 | , |
| backend | |||
| ) |
Definition at line 461 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_range_is_same(), query(), Xapian::Enquire::set_query(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | msetmaxitems1 | , |
| backend | |||
| ) |
Definition at line 225 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | msetzeroitems1 | , |
| backend | |||
| ) |
Definition at line 1539 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | multidb2 | , |
| backend &&! | multi | ||
| ) |
Definition at line 207 of file api_anydb.cc.
References Xapian::Database::add_database(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | pctcutoff1 | , |
| backend | |||
| ) |
Definition at line 668 of file api_anydb.cc.
References Xapian::MSet::back(), Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, print_mset_percentages(), query(), Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_AND_EXPLAIN, tout, and verbose.
| DEFINE_TESTCASE | ( | pctcutoff2 | , |
| backend | |||
| ) |
Definition at line 719 of file api_anydb.cc.
References get_database(), Xapian::MSet::get_matches_lower_bound(), Xapian::Enquire::get_mset(), Xapian::MSet::get_uncollapsed_matches_estimated(), Xapian::MSet::get_uncollapsed_matches_lower_bound(), Xapian::MSet::get_uncollapsed_matches_upper_bound(), Xapian::Query::OP_AND_NOT, print_mset_percentages(), Xapian::Enquire::set_collapse_key(), Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST, TEST_EQUAL, TEST_REL, tout, and verbose.
| DEFINE_TESTCASE | ( | pctcutoff3 | , |
| backend | |||
| ) |
Definition at line 751 of file api_anydb.cc.
References Xapian::MSet::back(), Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_percent(), print_mset_percentages(), Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, tout, and verbose.
| DEFINE_TESTCASE | ( | puncterms1 | , |
| backend | |||
| ) |
Definition at line 1765 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | qlen1 | , |
| backend | |||
| ) |
Definition at line 1681 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), Xapian::Enquire::set_query(), and TEST.
| DEFINE_TESTCASE | ( | qterminfo1 | , |
| backend | |||
| ) |
Test the termfreq and termweight info returned for query terms.
Definition at line 1449 of file api_anydb.cc.
References Xapian::Database::add_database(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSet::get_termfreq(), Xapian::MSet::get_termweight(), Xapian::Query::OP_OR, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), stemmer, TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | qterminfo2 | , |
| backend | |||
| ) |
Regression test for bug #37.
Definition at line 1511 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::MSet::get_termweight(), Xapian::Query::OP_AND, Xapian::Query::OP_AND_NOT, query(), Xapian::Enquire::set_query(), stemmer, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | repeatquery1 | , |
| backend | |||
| ) |
Definition at line 1019 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | reversebool1 | , |
| backend | |||
| ) |
Definition at line 871 of file api_anydb.cc.
References Xapian::Enquire::ASCENDING, Xapian::MSet::begin(), Xapian::Enquire::DESCENDING, Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_docid_order(), Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), Xapian::MSet::size(), TEST, TEST_AND_EXPLAIN, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | reversebool2 | , |
| backend | |||
| ) |
Definition at line 916 of file api_anydb.cc.
References Xapian::Enquire::ASCENDING, Xapian::MSet::begin(), Xapian::Enquire::DESCENDING, Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_docid_order(), Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), Xapian::MSet::size(), TEST, TEST_AND_EXPLAIN, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | rset1 | , |
| backend | |||
| ) |
Definition at line 1084 of file api_anydb.cc.
References Xapian::RSet::add_document(), get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | rset2 | , |
| backend | |||
| ) |
Test that an RSet affects MSet result order.
Definition at line 1104 of file api_anydb.cc.
References Xapian::RSet::add_document(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | rsetmultidb1 | , |
| backend &&! | multi | ||
| ) |
Definition at line 1129 of file api_anydb.cc.
References Xapian::Database::add_database(), Xapian::RSet::add_document(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), mset_range_is_same_weights(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), TEST, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | rsetmultidb3 | , |
| backend &&! | multi | ||
| ) |
Definition at line 1165 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, query(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | scaleweight1 | , |
| backend | |||
| ) |
Definition at line 2155 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Query::get_description(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), Xapian::Query::OP_SCALE_WEIGHT, Xapian::QueryParser::parse_query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), Heap::sort(), TEST_EQUAL, TEST_EQUAL_DOUBLE, TEST_EXCEPTION, TEST_NOT_EQUAL_DOUBLE, and tout.
| DEFINE_TESTCASE | ( | scaleweight2 | , |
| backend | |||
| ) |
Definition at line 2224 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Enquire::set_query(), Xapian::MSet::size(), Heap::sort(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | simplequery1 | , |
| backend | |||
| ) |
Definition at line 166 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | simplequery2 | , |
| backend | |||
| ) |
Definition at line 174 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), mset_expect_order(), Xapian::Enquire::set_query(), and TEST_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | simplequery3 | , |
| backend | |||
| ) |
Definition at line 197 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | spaceterms1 | , |
| backend | |||
| ) |
Definition at line 1783 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), Xapian::Document::get_data(), get_database(), Xapian::MSetIterator::get_document(), Xapian::Enquire::get_mset(), Xapian::Document::get_value(), Xapian::Enquire::set_query(), stemmer, TEST, TEST_EQUAL, TEST_MSET_SIZE, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | termlist1 | , |
| backend | |||
| ) |
Definition at line 1695 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | termlist2 | , |
| backend | |||
| ) |
Definition at line 1709 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | termlist3 | , |
| backend | |||
| ) |
Definition at line 1743 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and test_termlist3_helper().
| DEFINE_TESTCASE | ( | termlist4 | , |
| backend | |||
| ) |
Definition at line 1757 of file api_anydb.cc.
References get_database(), Xapian::TermIterator::skip_to(), and Xapian::Database::termlist_begin().
| DEFINE_TESTCASE | ( | termlisttermfreq1 | , |
| backend | |||
| ) |
Test that the termfreq returned by termlists is correct.
Definition at line 1407 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::begin(), Xapian::ESet::end(), get_database(), Xapian::Enquire::get_eset(), Xapian::ESetIterator::get_weight(), stemmer, TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | topercent1 | , |
| backend | |||
| ) |
Definition at line 475 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_percent(), Xapian::MSetIterator::get_weight(), query(), Xapian::Enquire::set_query(), and TEST_AND_EXPLAIN.
| DEFINE_TESTCASE | ( | topercent2 | , |
| backend | |||
| ) |
Definition at line 496 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), get_database(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_attained(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST, TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | uuid1 | , |
| backend &&! | multi | ||
| ) |
Definition at line 2276 of file api_anydb.cc.
References Xapian::Database::add_database(), Xapian::DB_BACKEND_INMEMORY, get_database(), Xapian::Database::get_uuid(), SKIP_TEST_FOR_BACKEND, TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | wqf1 | , |
| backend | |||
| ) |
Definition at line 1667 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), Xapian::Enquire::set_query(), and TEST.
| DEFINE_TESTCASE | ( | xor1 | , |
| backend | |||
| ) |
Definition at line 1827 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_XOR, query(), Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and stemmer.
| DEFINE_TESTCASE | ( | xor2 | , |
| backend | |||
| ) |
Test that weighted XOR queries work (bug fixed in 1.2.1 and 1.0.21).
Definition at line 1852 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_XOR, query(), Xapian::Enquire::set_query(), and stemmer.
| DEFINE_TESTCASE | ( | zerodocid1 | , |
| backend | |||
| ) |
Definition at line 117 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), TEST_AND_EXPLAIN, and TEST_MSET_SIZE.
|
static |
Definition at line 53 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), and tout.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 44 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), Xapian::MSetIterator::get_weight(), and tout.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 108 of file api_anydb.cc.
|
static |
Definition at line 62 of file api_anydb.cc.
References stemmer.
Referenced by Xapian::Weight::Internal::accumulate_stats(), Terms::as_opwindow_query(), Term::as_range_query(), Xapian::check_query(), DEFINE_TESTCASE(), Xapian::Internal::Context::expand_edit_distance(), Xapian::Internal::Context::expand_wildcard(), Xapian::Enquire::Internal::get_eset(), Xapian::Enquire::Internal::get_matching_terms_begin(), Xapian::Enquire::Internal::get_mset(), LocalSubMatch::get_postlist(), main(), RemoteServer::msg_query(), GlassDatabase::readahead_for_query(), HoneyDatabase::readahead_for_query(), PerfTestLogger::search_end(), Xapian::Enquire::set_query(), RemoteDatabase::set_query(), Xapian::MSet::Internal::snippet(), and ProbQuery::~ProbQuery().
|
static |
Definition at line 85 of file api_anydb.cc.
References stemmer.
|
static |
Definition at line 2023 of file api_anydb.cc.
References Xapian::Database::get_collection_freq(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), Xapian::Database::positionlist_begin(), Xapian::Database::term_exists(), TEST_EQUAL, and TEST_EXCEPTION.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1736 of file api_anydb.cc.
References get_database(), and Xapian::Database::termlist_begin().
Referenced by DEFINE_TESTCASE().