xapian-core
1.4.27
|
Tests of Xapian::QueryParser. More...
#include <config.h>
#include "api_queryparser.h"
#include <xapian.h>
#include "apitest.h"
#include "cputimer.h"
#include "str.h"
#include "stringutils.h"
#include <string>
#include <vector>
#include "testsuite.h"
#include "testutils.h"
Go to the source code of this file.
Classes | |
struct | test |
struct | AuthorValueRangeProcessor |
struct | AuthorRangeProcessor |
class | TitleFieldProcessor |
class | HostFieldProcessor |
class | DateRangeFieldProcessor |
struct | qp_default_op3_test |
Macros | |
#define | XAPIAN_DEPRECATED(D) D |
Functions | |
DEFINE_TESTCASE (queryparser1, !backend) | |
DEFINE_TESTCASE (qp_default_op1, !backend) | |
DEFINE_TESTCASE (qp_default_prefix1, !backend) | |
DEFINE_TESTCASE (qp_default_prefix2, !backend) | |
DEFINE_TESTCASE (qp_odd_chars1, !backend) | |
DEFINE_TESTCASE (qp_flag_wildcard1, backend) | |
DEFINE_TESTCASE (qp_flag_wildcard2, backend) | |
static void | test_qp_flag_wildcard3_helper (const Xapian::Database &db, Xapian::termcount max_expansion, const string &query_string) |
DEFINE_TESTCASE (qp_flag_wildcard3, backend) | |
static void | gen_qp_flag_partial1_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (qp_flag_partial1, backend) | |
DEFINE_TESTCASE (wildquery1, backend) | |
DEFINE_TESTCASE (qp_flag_bool_any_case1, !backend) | |
DEFINE_TESTCASE (qp_stopper1, !backend) | |
DEFINE_TESTCASE (qp_flag_pure_not1, !backend) | |
DEFINE_TESTCASE (qp_unstem_boolean_prefix, !backend) | |
DEFINE_TESTCASE (qp_accumulate, !backend) | |
DEFINE_TESTCASE (qp_value_range1, !backend) | |
DEFINE_TESTCASE (qp_range1, !backend) | |
DEFINE_TESTCASE (qp_value_range2, !backend) | |
DEFINE_TESTCASE (qp_range2, !backend) | |
static void | gen_qp_range3_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (qp_value_range3, backend) | |
DEFINE_TESTCASE (qp_range3, backend) | |
DEFINE_TESTCASE (qp_value_range4, !backend) | |
Test a boolean filter which happens to contain "..". More... | |
DEFINE_TESTCASE (qp_range4, !backend) | |
Test a boolean filter which happens to contain "..". More... | |
DEFINE_TESTCASE (qp_value_daterange1, !backend) | |
DEFINE_TESTCASE (qp_daterange1, !backend) | |
DEFINE_TESTCASE (qp_value_daterange2, !backend) | |
DEFINE_TESTCASE (qp_daterange2, !backend) | |
DEFINE_TESTCASE (qp_value_stringrange1, !backend) | |
DEFINE_TESTCASE (qp_stringrange1, !backend) | |
DEFINE_TESTCASE (qp_value_customrange1, !backend) | |
DEFINE_TESTCASE (qp_customrange1, !backend) | |
DEFINE_TESTCASE (qp_fieldproc1, !backend) | |
DEFINE_TESTCASE (qp_fieldproc2, !backend) | |
DEFINE_TESTCASE (qp_fieldproc3, !backend) | |
DEFINE_TESTCASE (qp_stoplist1, !backend) | |
DEFINE_TESTCASE (qp_spell1, spelling) | |
DEFINE_TESTCASE (qp_spell2, spelling) | |
static void | gen_simple_spelling_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (qp_spellwild1, spelling) | |
DEFINE_TESTCASE (qp_spellpartial1, spelling) | |
DEFINE_TESTCASE (qp_synonym1, synonyms) | |
DEFINE_TESTCASE (qp_synonym2, synonyms) | |
DEFINE_TESTCASE (qp_synonym3, synonyms) | |
DEFINE_TESTCASE (qp_stem_all1, !backend) | |
DEFINE_TESTCASE (qp_stem_all_z1, !backend) | |
static double | time_query_parse (const Xapian::Database &db, const string &q, int repetitions, unsigned flags) |
static void | qp_scale1_helper (const Xapian::Database &db, const string &q, unsigned n, unsigned flags) |
DEFINE_TESTCASE (qp_scale1, writable &&synonyms) | |
DEFINE_TESTCASE (qp_near1, !backend) | |
DEFINE_TESTCASE (qp_phrase1, !backend) | |
DEFINE_TESTCASE (qp_stopword_group1, backend) | |
DEFINE_TESTCASE (qp_default_op2, !backend) | |
Check that QueryParser::set_default_op() rejects inappropriate ops. More... | |
DEFINE_TESTCASE (qp_default_op3, !backend) | |
Check that QueryParser::set_default_op() accepts appropriate ops. More... | |
DEFINE_TESTCASE (qp_defaultstrategysome1, !backend) | |
Test that the default strategy is now STEM_SOME (as of 1.3.1). More... | |
DEFINE_TESTCASE (qp_stemsomefullpos, !backend) | |
Test STEM_SOME_FULL_POS. More... | |
DEFINE_TESTCASE (qp_nopos, !backend) | |
Tests of Xapian::QueryParser.
Definition in file api_queryparser.cc.
#define XAPIAN_DEPRECATED | ( | D | ) | D |
Definition at line 27 of file api_queryparser.cc.
DEFINE_TESTCASE | ( | queryparser1 | , |
! | backend | ||
) |
Definition at line 729 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), FAIL_TEST, Xapian::QueryParser::FLAG_DEFAULT, Xapian::QueryParser::FLAG_NGRAMS, Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_EXCEPTION, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_default_op1 | , |
! | backend | ||
) |
Definition at line 812 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), FAIL_TEST, Xapian::QueryParser::FLAG_DEFAULT, Xapian::QueryParser::FLAG_NGRAMS, Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::Query::OP_AND, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_default_op(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_default_prefix1 | , |
! | backend | ||
) |
Definition at line 853 of file api_queryparser.cc.
References Xapian::QueryParser::add_prefix(), Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_NGRAMS, Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | qp_default_prefix2 | , |
! | backend | ||
) |
Definition at line 872 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_PHRASE, Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_EXCEPTION, and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | qp_odd_chars1 | , |
! | backend | ||
) |
Definition at line 911 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_flag_wildcard1 | , |
backend | |||
) |
Definition at line 920 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::QueryParser::FLAG_LOVEHATE, Xapian::QueryParser::FLAG_WILDCARD, get_database(), Xapian::Query::get_description(), Xapian::Query::OP_AND, Xapian::QueryParser::set_database(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | qp_flag_wildcard2 | , |
backend | |||
) |
Definition at line 1021 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::QueryParser::FLAG_WILDCARD, get_database(), Xapian::Query::get_description(), Xapian::QueryParser::set_database(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | qp_flag_wildcard3 | , |
backend | |||
) |
Definition at line 1057 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), get_database(), TEST_EXCEPTION, and test_qp_flag_wildcard3_helper().
DEFINE_TESTCASE | ( | qp_flag_partial1 | , |
backend | |||
) |
Definition at line 1128 of file api_queryparser.cc.
References Xapian::QueryParser::add_prefix(), Xapian::QueryParser::FLAG_PARTIAL, Xapian::QueryParser::FLAG_WILDCARD, gen_qp_flag_partial1_db(), get_database(), Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_ALL, Xapian::QueryParser::STEM_ALL_Z, Xapian::QueryParser::STEM_NONE, Xapian::QueryParser::STEM_SOME, Xapian::QueryParser::STEM_SOME_FULL_POS, stemmer, and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | wildquery1 | , |
backend | |||
) |
Definition at line 1245 of file api_queryparser.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 | ( | qp_flag_bool_any_case1 | , |
! | backend | ||
) |
Definition at line 1277 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | qp_stopper1 | , |
! | backend | ||
) |
Definition at line 1311 of file api_queryparser.cc.
References Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::Query::OP_AND, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_default_op(), Xapian::QueryParser::set_stopper(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_flag_pure_not1 | , |
! | backend | ||
) |
Definition at line 1348 of file api_queryparser.cc.
References Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_unstem_boolean_prefix | , |
! | backend | ||
) |
Definition at line 1380 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), TEST, TEST_EQUAL, TEST_STRINGS_EQUAL, Xapian::QueryParser::unstem_begin(), and Xapian::QueryParser::unstem_end().
DEFINE_TESTCASE | ( | qp_accumulate | , |
! | backend | ||
) |
Definition at line 1393 of file api_queryparser.cc.
References Xapian::SimpleStopper::add(), Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), Xapian::QueryParser::FLAG_ACCUMULATE, Xapian::QueryParser::FLAG_DEFAULT, Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stopper(), Xapian::QueryParser::stoplist_begin(), Xapian::QueryParser::stoplist_end(), TEST, TEST_EQUAL, tout, Xapian::QueryParser::unstem_begin(), and Xapian::QueryParser::unstem_end().
DEFINE_TESTCASE | ( | qp_value_range1 | , |
! | backend | ||
) |
Definition at line 1522 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_range1 | , |
! | backend | ||
) |
Definition at line 1550 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_range2 | , |
! | backend | ||
) |
Definition at line 1612 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_range2 | , |
! | backend | ||
) |
Definition at line 1648 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::RP_REPEATED, Xapian::RP_SUFFIX, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_range3 | , |
backend | |||
) |
Definition at line 1701 of file api_queryparser.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), gen_qp_range3_db(), get_database(), Xapian::Enquire::get_mset(), Xapian::QueryParser::parse_query(), query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), Xapian::sortable_serialise(), Xapian::Internal::str(), TEST_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_range3 | , |
backend | |||
) |
Definition at line 1737 of file api_queryparser.cc.
References Xapian::QueryParser::add_rangeprocessor(), gen_qp_range3_db(), get_database(), Xapian::Enquire::get_mset(), Xapian::QueryParser::parse_query(), query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), Xapian::sortable_serialise(), Xapian::Internal::str(), TEST_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_range4 | , |
! | backend | ||
) |
Test a boolean filter which happens to contain "..".
Regression test for bug fixed in 1.2.3.
Also test that the same prefix can be set for a valuerange and filter.
Definition at line 1785 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_range4 | , |
! | backend | ||
) |
Test a boolean filter which happens to contain "..".
Regression test for bug fixed in 1.2.3.
Also test that the same prefix can be set for a range and filter.
Definition at line 1819 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_daterange1 | , |
! | backend | ||
) |
Definition at line 1858 of file api_queryparser.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_daterange1 | , |
! | backend | ||
) |
Definition at line 1885 of file api_queryparser.cc.
References Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::RP_DATE_PREFER_MDY, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_daterange2 | , |
! | backend | ||
) |
Definition at line 1927 of file api_queryparser.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_daterange2 | , |
! | backend | ||
) |
Definition at line 1963 of file api_queryparser.cc.
References Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::RP_DATE_PREFER_MDY, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_stringrange1 | , |
! | backend | ||
) |
Definition at line 2006 of file api_queryparser.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_stringrange1 | , |
! | backend | ||
) |
Definition at line 2035 of file api_queryparser.cc.
References Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_value_customrange1 | , |
! | backend | ||
) |
Definition at line 2082 of file api_queryparser.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_customrange1 | , |
! | backend | ||
) |
Definition at line 2121 of file api_queryparser.cc.
References Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_fieldproc1 | , |
! | backend | ||
) |
Definition at line 2178 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_fieldproc2 | , |
! | backend | ||
) |
Definition at line 2235 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_valuerangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_fieldproc3 | , |
! | backend | ||
) |
Definition at line 2264 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_rangeprocessor(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_stoplist1 | , |
! | backend | ||
) |
Definition at line 2292 of file api_queryparser.cc.
References Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stopper(), Xapian::QueryParser::stoplist_begin(), Xapian::QueryParser::stoplist_end(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | qp_spell1 | , |
spelling | |||
) |
Definition at line 2338 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::WritableDatabase::add_spelling(), Xapian::Document::add_term(), Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_SPELLING_CORRECTION, get_database(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_spell2 | , |
spelling | |||
) |
Definition at line 2371 of file api_queryparser.cc.
References Xapian::Database::add_database(), Xapian::WritableDatabase::add_spelling(), Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_SPELLING_CORRECTION, Xapian::QueryParser::get_corrected_query_string(), get_database(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_spellwild1 | , |
spelling | |||
) |
Definition at line 2422 of file api_queryparser.cc.
References Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_SPELLING_CORRECTION, Xapian::QueryParser::FLAG_WILDCARD, gen_simple_spelling_db(), Xapian::QueryParser::get_corrected_query_string(), get_database(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_spellpartial1 | , |
spelling | |||
) |
Definition at line 2461 of file api_queryparser.cc.
References Xapian::QueryParser::FLAG_PARTIAL, Xapian::QueryParser::FLAG_SPELLING_CORRECTION, gen_simple_spelling_db(), Xapian::QueryParser::get_corrected_query_string(), get_database(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_synonym1 | , |
synonyms | |||
) |
Definition at line 2498 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_synonym(), get_database(), Xapian::Query::get_description(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_synonym2 | , |
synonyms | |||
) |
Definition at line 2538 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_synonym(), Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS, Xapian::QueryParser::FLAG_DEFAULT, get_database(), Xapian::Query::get_description(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_synonym3 | , |
synonyms | |||
) |
Definition at line 2586 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_synonym(), Xapian::QueryParser::FLAG_BOOLEAN, Xapian::QueryParser::FLAG_LOVEHATE, Xapian::QueryParser::FLAG_PHRASE, Xapian::QueryParser::FLAG_SYNONYM, get_database(), Xapian::Query::get_description(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_stem_all1 | , |
! | backend | ||
) |
Definition at line 2628 of file api_queryparser.cc.
References Xapian::QueryParser::add_prefix(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_ALL, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_stem_all_z1 | , |
! | backend | ||
) |
Definition at line 2663 of file api_queryparser.cc.
References Xapian::QueryParser::add_prefix(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_ALL_Z, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_scale1 | , |
writable && | synonyms | ||
) |
Definition at line 2744 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_synonym(), Xapian::WritableDatabase::commit(), Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS, Xapian::QueryParser::FLAG_DEFAULT, Xapian::QueryParser::FLAG_SYNONYM, get_writable_database(), and qp_scale1_helper().
DEFINE_TESTCASE | ( | qp_near1 | , |
! | backend | ||
) |
Definition at line 2814 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::Query::OP_NEAR, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_default_op(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_phrase1 | , |
! | backend | ||
) |
Definition at line 2889 of file api_queryparser.cc.
References Xapian::QueryParser::add_boolean_prefix(), Xapian::QueryParser::add_prefix(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::Query::OP_PHRASE, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_default_op(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_stopword_group1 | , |
backend | |||
) |
Definition at line 2954 of file api_queryparser.cc.
References Xapian::SimpleStopper::add(), Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::QueryParser::FLAG_WILDCARD, get_database(), Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), Xapian::QueryParser::set_default_op(), Xapian::QueryParser::set_stopper(), test_stopword_group_and_queries, test_stopword_group_or_queries, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | qp_default_op2 | , |
! | backend | ||
) |
Check that QueryParser::set_default_op() rejects inappropriate ops.
Definition at line 3006 of file api_queryparser.cc.
References Xapian::QueryParser::get_default_op(), Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_AND_NOT, Xapian::Query::OP_FILTER, Xapian::Query::OP_OR, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Query::OP_VALUE_GE, Xapian::Query::OP_VALUE_LE, Xapian::Query::OP_VALUE_RANGE, Xapian::Query::OP_XOR, Xapian::QueryParser::set_default_op(), TEST_EQUAL, TEST_EXCEPTION, and tout.
DEFINE_TESTCASE | ( | qp_default_op3 | , |
! | backend | ||
) |
Check that QueryParser::set_default_op() accepts appropriate ops.
Definition at line 3032 of file api_queryparser.cc.
References qp_default_op3_test::expect, Xapian::QueryParser::get_default_op(), Xapian::Query::get_description(), qp_default_op3_test::op, Xapian::Query::OP_AND, Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_NEAR, Xapian::Query::OP_OR, Xapian::Query::OP_PHRASE, Xapian::Query::OP_SYNONYM, Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_default_op(), TEST_EQUAL, tests, and tout.
DEFINE_TESTCASE | ( | qp_defaultstrategysome1 | , |
! | backend | ||
) |
Test that the default strategy is now STEM_SOME (as of 1.3.1).
Definition at line 3059 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | qp_stemsomefullpos | , |
! | backend | ||
) |
Test STEM_SOME_FULL_POS.
Definition at line 3066 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), Xapian::QueryParser::set_stemming_strategy(), Xapian::QueryParser::STEM_SOME_FULL_POS, and TEST_EQUAL.
DEFINE_TESTCASE | ( | qp_nopos | , |
! | backend | ||
) |
Definition at line 3074 of file api_queryparser.cc.
References Xapian::QueryParser::FLAG_DEFAULT, Xapian::QueryParser::FLAG_NO_POSITIONS, Xapian::Error::get_description(), Xapian::Query::get_description(), Xapian::Error::get_msg(), Xapian::QueryParser::parse_query(), TEST_STRINGS_EQUAL, tests, and tout.
|
static |
Definition at line 1099 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), and stemmer.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1686 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), and Xapian::sortable_serialise().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2404 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_spelling().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2709 of file api_queryparser.cc.
References SKIP_TEST, TEST_REL, time_query_parse(), and tout.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1042 of file api_queryparser.cc.
References Xapian::QueryParser::FLAG_WILDCARD, Xapian::Enquire::get_mset(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_database(), Xapian::QueryParser::set_max_expansion(), and Xapian::Enquire::set_query().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2691 of file api_queryparser.cc.
References CPUTimer::get_time(), Xapian::Query::OP_OR, Xapian::QueryParser::parse_query(), and Xapian::QueryParser::set_database().
Referenced by qp_scale1_helper().
|
static |
Definition at line 782 of file api_queryparser.cc.
|
static |
Definition at line 2166 of file api_queryparser.cc.
|
static |
Definition at line 2228 of file api_queryparser.cc.
|
static |
Definition at line 2449 of file api_queryparser.cc.
|
static |
Definition at line 2321 of file api_queryparser.cc.
|
static |
Definition at line 2412 of file api_queryparser.cc.
|
static |
Definition at line 2527 of file api_queryparser.cc.
|
static |
Definition at line 2782 of file api_queryparser.cc.
|
static |
Definition at line 48 of file api_queryparser.cc.
|
static |
Definition at line 2853 of file api_queryparser.cc.
|
static |
Definition at line 1339 of file api_queryparser.cc.
|
static |
Definition at line 2620 of file api_queryparser.cc.
|
static |
Definition at line 2655 of file api_queryparser.cc.
|
static |
Definition at line 1292 of file api_queryparser.cc.
|
static |
Definition at line 2939 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2928 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2566 of file api_queryparser.cc.
|
static |
Definition at line 2477 of file api_queryparser.cc.
|
static |
Definition at line 2063 of file api_queryparser.cc.
|
static |
Definition at line 1847 of file api_queryparser.cc.
|
static |
Definition at line 1911 of file api_queryparser.cc.
|
static |
Definition at line 1496 of file api_queryparser.cc.
|
static |
Definition at line 1577 of file api_queryparser.cc.
|
static |
Definition at line 1772 of file api_queryparser.cc.
|
static |
Definition at line 1999 of file api_queryparser.cc.