#include <config.h>#include "api_anydb.h"#include <algorithm>#include <string>#include <xapian.h>#include "backendmanager_local.h"#include "testsuite.h"#include "testutils.h"#include "utils.h"#include "apitest.h"#include <list>

Go to the source code of this file.
Classes | |
| class | myExpandFunctor |
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 (wildquery1, backend) | |
| DEFINE_TESTCASE (multidb1, backend) | |
| DEFINE_TESTCASE (multidb2, backend &&!multi) | |
| DEFINE_TESTCASE (multidb3, backend &&!multi) | |
| DEFINE_TESTCASE (multidb4, backend &&!multi) | |
| DEFINE_TESTCASE (multidb5, backend &&!multi) | |
| DEFINE_TESTCASE (msetmaxitems1, backend) | |
| DEFINE_TESTCASE (expandweights1, backend) | |
| DEFINE_TESTCASE (expandweights2, backend) | |
| DEFINE_TESTCASE (expandweights3, backend) | |
| DEFINE_TESTCASE (expandweights4, 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 (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 (poscollapse1, 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) | |
| DEFINE_TESTCASE (rsetmultidb1, backend &&!multi) | |
| DEFINE_TESTCASE (rsetmultidb3, backend &&!multi) | |
| DEFINE_TESTCASE (eliteset1, backend) | |
| Simple test of the elite set operator. | |
| DEFINE_TESTCASE (eliteset2, backend) | |
| Test that the elite set operator works if the set contains sub-expressions (regression test). | |
| DEFINE_TESTCASE (eliteset3, backend) | |
| Test that elite set doesn't affect query results if we have fewer terms than the threshold. | |
| DEFINE_TESTCASE (eliteset4, backend) | |
| Test that elite set doesn't pick terms with 0 frequency. | |
| DEFINE_TESTCASE (eliteset5, backend) | |
| Regression test for problem with excess precision. | |
| DEFINE_TESTCASE (termlisttermfreq1, backend) | |
| Test that the termfreq returned by termlists is correct. | |
| DEFINE_TESTCASE (qterminfo1, backend) | |
| Test the termfrequency and termweight info returned for query terms. | |
| DEFINE_TESTCASE (qterminfo2, backend) | |
| Regression test for bug #37. | |
| 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). | |
| 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, writable) | |
| DEFINE_TESTCASE (alldocspl2, writable) | |
| DEFINE_TESTCASE (scaleweight1, backend) | |
| DEFINE_TESTCASE (scaleweight2, backend) | |
| DEFINE_TESTCASE (bm25weight1, backend) | |
| DEFINE_TESTCASE (tradweight1, backend) | |
| DEFINE_TESTCASE (uuid1, backend &&!multi) | |
| DEFINE_TESTCASE | ( | uuid1 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 2318 of file api_anydb.cc.
References get_database(), Xapian::Database::get_uuid(), Xapian::InMemory::open(), SKIP_TEST_FOR_BACKEND, TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | tradweight1 | , | |
| backend | ||||
| ) |
Definition at line 2300 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | bm25weight1 | , | |
| backend | ||||
| ) |
Definition at line 2289 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | scaleweight2 | , | |
| backend | ||||
| ) |
Definition at line 2235 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(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | scaleweight1 | , | |
| backend | ||||
| ) |
Definition at line 2164 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Query::get_description(), Xapian::Enquire::get_mset(), Xapian::Query::OP_SCALE_WEIGHT, Xapian::QueryParser::parse_query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, TEST_EXCEPTION, TEST_NOT_EQUAL_DOUBLE, and tout.
| DEFINE_TESTCASE | ( | alldocspl2 | , | |
| writable | ||||
| ) |
Definition at line 2081 of file api_anydb.cc.
References Xapian::Document::add_value(), Xapian::WritableDatabase::commit(), Xapian::WritableDatabase::delete_document(), Xapian::PostingIterator::get_doclength(), 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 | ( | alldocspl1 | , | |
| writable | ||||
| ) |
Definition at line 2062 of file api_anydb.cc.
References Xapian::Document::add_value(), Xapian::PostingIterator::get_doclength(), 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 | ( | emptyterm1 | , | |
| backend | ||||
| ) |
Definition at line 2045 of file api_anydb.cc.
References get_database(), Xapian::Database::get_doccount(), test_emptyterm1_helper(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | allpostlist1 | , | |
| backend | ||||
| ) |
Definition at line 2008 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 | ( | checkatleast3 | , | |
| backend | ||||
| ) |
Definition at line 1945 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(), TEST_EQUAL, TEST_MSET_SIZE, and TEST_REL.
| DEFINE_TESTCASE | ( | checkatleast2 | , | |
| backend | ||||
| ) |
Definition at line 1925 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 | ( | checkatleast1 | , | |
| backend | ||||
| ) |
Definition at line 1914 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::MSet::size(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | emptyop1 | , | |
| backend | ||||
| ) |
Definition at line 1899 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_matching_terms_begin(), Xapian::Enquire::get_mset(), Xapian::Query::OP_XOR, Xapian::Enquire::set_query(), TEST_EXCEPTION, and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | getdoc1 | , | |
| backend | ||||
| ) |
Definition at line 1881 of file api_anydb.cc.
References get_database(), Xapian::Database::get_document(), TEST_EQUAL, and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | xor2 | , | |
| backend | ||||
| ) |
Test that weighted XOR queries work (bug fixed in 1.2.1 and 1.0.21).
Definition at line 1855 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 | ( | xor1 | , | |
| backend | ||||
| ) |
Definition at line 1828 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 | ( | spaceterms1 | , | |
| backend | ||||
| ) |
Definition at line 1782 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), stemmer, TEST, TEST_EQUAL, TEST_MSET_SIZE, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | puncterms1 | , | |
| backend | ||||
| ) |
Definition at line 1762 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | termlist4 | , | |
| backend | ||||
| ) |
Definition at line 1753 of file api_anydb.cc.
References get_database(), Xapian::TermIterator::skip_to(), and Xapian::Database::termlist_begin().
| DEFINE_TESTCASE | ( | termlist3 | , | |
| backend | ||||
| ) |
Definition at line 1738 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and test_termlist3_helper().
| DEFINE_TESTCASE | ( | termlist2 | , | |
| backend | ||||
| ) |
Definition at line 1703 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | termlist1 | , | |
| backend | ||||
| ) |
Definition at line 1688 of file api_anydb.cc.
References get_database(), Xapian::Database::termlist_begin(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | qlen1 | , | |
| backend | ||||
| ) |
Definition at line 1673 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST.
| DEFINE_TESTCASE | ( | wqf1 | , | |
| backend | ||||
| ) |
Definition at line 1658 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST.
| DEFINE_TESTCASE | ( | matches1 | , | |
| backend | ||||
| ) |
Definition at line 1545 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(), TEST_EQUAL, and TEST_REL.
| DEFINE_TESTCASE | ( | msetzeroitems1 | , | |
| backend | ||||
| ) |
Definition at line 1532 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 | ( | qterminfo2 | , | |
| backend | ||||
| ) |
Regression test for bug #37.
Definition at line 1507 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 | ( | qterminfo1 | , | |
| backend | ||||
| ) |
Test the termfrequency and termweight info returned for query terms.
Definition at line 1452 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(), stemmer, TEST_EQUAL, TEST_EXCEPTION, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | termlisttermfreq1 | , | |
| backend | ||||
| ) |
Test that the termfreq returned by termlists is correct.
Definition at line 1408 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 | ( | eliteset5 | , | |
| backend | ||||
| ) |
Regression test for problem with excess precision.
Definition at line 1374 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Enquire::set_query(), and SKIP_TEST_FOR_BACKEND.
| DEFINE_TESTCASE | ( | eliteset4 | , | |
| backend | ||||
| ) |
Test that elite set doesn't pick terms with 0 frequency.
Definition at line 1345 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(), SKIP_TEST_FOR_BACKEND, TEST_EQUAL, and TEST_NOT_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 1298 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 | ( | eliteset2 | , | |
| backend | ||||
| ) |
Test that the elite set operator works if the set contains sub-expressions (regression test).
Definition at line 1266 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(), SKIP_TEST_FOR_BACKEND, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | eliteset1 | , | |
| backend | ||||
| ) |
Simple test of the elite set operator.
Definition at line 1241 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(), SKIP_TEST_FOR_BACKEND, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | rsetmultidb3 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 1233 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, query(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | rsetmultidb1 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 1195 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 | ( | rset2 | , | |
| backend | ||||
| ) |
Definition at line 1175 of file api_anydb.cc.
References Xapian::RSet::add_document(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, query(), and Xapian::Enquire::set_query().
| DEFINE_TESTCASE | ( | rset1 | , | |
| backend | ||||
| ) |
Definition at line 1153 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 | ( | absentterm2 | , | |
| backend | ||||
| ) |
Definition at line 1138 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 | ( | absentterm1 | , | |
| backend | ||||
| ) |
Definition at line 1126 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 | ( | fetchdocs1 | , | |
| backend | ||||
| ) |
Definition at line 1094 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 | ( | repeatquery1 | , | |
| backend | ||||
| ) |
Definition at line 1080 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 | ( | poscollapse1 | , | |
| backend | ||||
| ) |
Definition at line 1056 of file api_anydb.cc.
References get_database(), Xapian::Query::get_description(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, Xapian::Enquire::set_query(), TEST_EQUAL, tout, and verbose.
| DEFINE_TESTCASE | ( | getmterms2 | , | |
| backend | ||||
| ) |
Definition at line 1026 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 | ( | getmterms1 | , | |
| backend | ||||
| ) |
Definition at line 995 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 | ( | reversebool2 | , | |
| backend | ||||
| ) |
Definition at line 949 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_AND_EXPLAIN, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | reversebool1 | , | |
| backend | ||||
| ) |
Definition at line 903 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_AND_EXPLAIN, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | maxattain1 | , | |
| backend | ||||
| ) |
Definition at line 887 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 | ( | allowqterms1 | , | |
| backend | ||||
| ) |
Definition at line 858 of file api_anydb.cc.
References 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(), TEST, and TEST_NOT_EQUAL.
| DEFINE_TESTCASE | ( | cutoff1 | , | |
| backend | ||||
| ) |
Definition at line 805 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 | ( | pctcutoff3 | , | |
| backend | ||||
| ) |
Definition at line 779 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), print_mset_percentages(), Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, tout, and verbose.
| DEFINE_TESTCASE | ( | pctcutoff2 | , | |
| backend | ||||
| ) |
Definition at line 745 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 | ( | pctcutoff1 | , | |
| backend | ||||
| ) |
Definition at line 692 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 | ( | expandfunctor1 | , | |
| backend | ||||
| ) |
Definition at line 631 of file api_anydb.cc.
References 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 | ( | topercent2 | , | |
| backend | ||||
| ) |
Definition at line 559 of file api_anydb.cc.
References BackendManagerLocal, 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(), test_driver::get_srcdir(), mset_range_is_same(), Xapian::Query::OP_OR, query(), Xapian::MSet::size(), TEST, TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | topercent1 | , | |
| backend | ||||
| ) |
Definition at line 537 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 | ( | msetfirst1 | , | |
| backend | ||||
| ) |
Definition at line 522 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 | ( | boolquery1 | , | |
| backend | ||||
| ) |
Definition at line 501 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 | ( | expandmaxitems1 | , | |
| backend | ||||
| ) |
Definition at line 481 of file api_anydb.cc.
References Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), Xapian::MSet::size(), TEST, TEST_EQUAL, and tout.
| DEFINE_TESTCASE | ( | expandweights4 | , | |
| backend | ||||
| ) |
Definition at line 458 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights3 | , | |
| backend | ||||
| ) |
Definition at line 425 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::ESet::back(), Xapian::MSet::begin(), get_database(), get_dbtype(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), startswith(), TEST_EQUAL_DOUBLE, TEST_NOT_EQUAL_DOUBLE, and TEST_REL.
| DEFINE_TESTCASE | ( | expandweights2 | , | |
| backend | ||||
| ) |
Definition at line 395 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), get_dbtype(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), startswith(), TEST_EQUAL, TEST_EQUAL_DOUBLE, and TEST_NOT_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | expandweights1 | , | |
| backend | ||||
| ) |
Definition at line 374 of file api_anydb.cc.
References Xapian::RSet::add_document(), Xapian::MSet::begin(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::ESet::size(), TEST_EQUAL, TEST_EQUAL_DOUBLE, and Xapian::Enquire::USE_EXACT_TERMFREQ.
| DEFINE_TESTCASE | ( | msetmaxitems1 | , | |
| backend | ||||
| ) |
Definition at line 359 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | multidb5 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 340 of file api_anydb.cc.
References Xapian::Database::add_database(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_AND, query(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().
| DEFINE_TESTCASE | ( | multidb4 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 321 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 | ( | multidb3 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 303 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 | ( | multidb2 | , | |
| backend &&! | multi | |||
| ) |
Definition at line 278 of file api_anydb.cc.
References Xapian::Database::add_database(), get_database(), Xapian::Enquire::get_mset(), mset_range_is_same_weights(), Xapian::Query::OP_OR, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | multidb1 | , | |
| backend | ||||
| ) |
Definition at line 253 of file api_anydb.cc.
References Xapian::Database::add_database(), get_database(), Xapian::Enquire::get_mset(), mset_range_is_same_weights(), Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | wildquery1 | , | |
| backend | ||||
| ) |
Definition at line 218 of file api_anydb.cc.
References Xapian::QueryParser::FLAG_LOVEHATE, Xapian::QueryParser::FLAG_WILDCARD, get_database(), Xapian::Query::get_description(), Xapian::Enquire::get_mset(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), Xapian::Enquire::set_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_ALL, TEST_MSET_SIZE, and tout.
| DEFINE_TESTCASE | ( | simplequery3 | , | |
| backend | ||||
| ) |
Definition at line 205 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), query(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | simplequery2 | , | |
| backend | ||||
| ) |
Definition at line 180 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 | ( | simplequery1 | , | |
| backend | ||||
| ) |
Definition at line 171 of file api_anydb.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST_MSET_SIZE.
| DEFINE_TESTCASE | ( | emptyquery1 | , | |
| backend | ||||
| ) |
Definition at line 143 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 | ( | zerodocid1 | , | |
| backend | ||||
| ) |
Definition at line 118 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 void print_mset_percentages | ( | const Xapian::MSet & | mset | ) | [static] |
Definition at line 54 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::convert_to_percent(), Xapian::MSet::end(), and tout.
Referenced by DEFINE_TESTCASE().
| static void print_mset_weights | ( | const Xapian::MSet & | mset | ) | [static] |
Definition at line 45 of file api_anydb.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), Xapian::MSetIterator::get_weight(), and tout.
Referenced by DEFINE_TESTCASE().
| static Xapian::Query query | ( | const string & | t | ) | [static] |
Definition at line 109 of file api_anydb.cc.
| 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] |
| 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] |
Definition at line 63 of file api_anydb.cc.
References stemmer.
Referenced by DEFINE_TESTCASE(), main(), RemoteServer::msg_query(), test_qp_odd_chars1(), and test_qp_value_range3().
| static void test_emptyterm1_helper | ( | Xapian::Database & | db | ) | [static] |
Definition at line 2035 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 Xapian::TermIterator test_termlist3_helper | ( | ) | [static] |
Definition at line 1731 of file api_anydb.cc.
References get_database(), and Xapian::Database::termlist_begin().
Referenced by DEFINE_TESTCASE().