|
xapian-core
1.4.31
|
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"
Include dependency graph for api_queryparser.cc: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 | ( | qp_accumulate | , |
| ! | backend | ||
| ) |
Definition at line 1412 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_customrange1 | , |
| ! | backend | ||
| ) |
Definition at line 2170 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, test_value_customrange1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_daterange1 | , |
| ! | backend | ||
| ) |
Definition at line 1934 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, test_value_daterange1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_daterange2 | , |
| ! | backend | ||
| ) |
Definition at line 2012 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, test_value_daterange2_queries, 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_and_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_default_op2 | , |
| ! | backend | ||
| ) |
Check that QueryParser::set_default_op() rejects inappropriate ops.
Definition at line 3055 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 3081 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_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_defaultstrategysome1 | , |
| ! | backend | ||
| ) |
Test that the default strategy is now STEM_SOME (as of 1.3.1).
Definition at line 3108 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), Xapian::QueryParser::set_stemmer(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | qp_fieldproc1 | , |
| ! | backend | ||
| ) |
Definition at line 2227 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_fieldproc1_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_fieldproc2 | , |
| ! | backend | ||
| ) |
Definition at line 2284 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_fieldproc2_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_fieldproc3 | , |
| ! | backend | ||
| ) |
Definition at line 2313 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_fieldproc2_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_flag_bool_any_case1 | , |
| ! | backend | ||
| ) |
Definition at line 1296 of file api_queryparser.cc.
References Xapian::Query::get_description(), Xapian::QueryParser::parse_query(), and TEST_STRINGS_EQUAL.
| 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::set_stopper(), 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 | ( | qp_flag_pure_not1 | , |
| ! | backend | ||
| ) |
Definition at line 1367 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_pure_not_queries, 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_near1 | , |
| ! | backend | ||
| ) |
Definition at line 2863 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_near_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_nopos | , |
| ! | backend | ||
| ) |
Definition at line 3123 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.
| 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_phrase1 | , |
| ! | backend | ||
| ) |
Definition at line 2938 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_phrase_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_range1 | , |
| ! | backend | ||
| ) |
Definition at line 1569 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, test_value_range1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_range2 | , |
| ! | backend | ||
| ) |
Definition at line 1689 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, test_value_range2_queries, and tout.
| DEFINE_TESTCASE | ( | qp_range3 | , |
| backend | |||
| ) |
Definition at line 1786 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_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 1868 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, test_value_range4_queries, and tout.
| DEFINE_TESTCASE | ( | qp_scale1 | , |
| writable && | synonyms | ||
| ) |
Definition at line 2793 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_spell1 | , |
| spelling | |||
| ) |
Definition at line 2387 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_mispelled_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_spell2 | , |
| spelling | |||
| ) |
Definition at line 2420 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_mispelled_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_spellpartial1 | , |
| spelling | |||
| ) |
Definition at line 2510 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_mispelled_partial_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_spellwild1 | , |
| spelling | |||
| ) |
Definition at line 2471 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_mispelled_queries, test_mispelled_wildcard_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_stem_all1 | , |
| ! | backend | ||
| ) |
Definition at line 2677 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_stem_all_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_stem_all_z1 | , |
| ! | backend | ||
| ) |
Definition at line 2712 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_stem_all_z_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_stemsomefullpos | , |
| ! | backend | ||
| ) |
Test STEM_SOME_FULL_POS.
Definition at line 3115 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_stoplist1 | , |
| ! | backend | ||
| ) |
Definition at line 2341 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_stopper1 | , |
| ! | backend | ||
| ) |
Definition at line 1330 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_stop_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_stopword_group1 | , |
| backend | |||
| ) |
Definition at line 3003 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_stringrange1 | , |
| ! | backend | ||
| ) |
Definition at line 2084 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, test_value_stringrange1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_synonym1 | , |
| synonyms | |||
| ) |
Definition at line 2547 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, test_synonym_queries, and tout.
| DEFINE_TESTCASE | ( | qp_synonym2 | , |
| synonyms | |||
| ) |
Definition at line 2587 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_multi_synonym_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | qp_synonym3 | , |
| synonyms | |||
| ) |
Definition at line 2635 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, test_synonym_op_queries, and tout.
| DEFINE_TESTCASE | ( | qp_unstem_boolean_prefix | , |
| ! | backend | ||
| ) |
Definition at line 1399 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_value_customrange1 | , |
| ! | backend | ||
| ) |
Definition at line 2131 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, test_value_customrange1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_daterange1 | , |
| ! | backend | ||
| ) |
Definition at line 1907 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, test_value_daterange1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_daterange2 | , |
| ! | backend | ||
| ) |
Definition at line 1976 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, test_value_daterange2_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_range1 | , |
| ! | backend | ||
| ) |
Definition at line 1541 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, test_value_range1_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_range2 | , |
| ! | backend | ||
| ) |
Definition at line 1649 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, test_value_range2_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_range3 | , |
| backend | |||
| ) |
Definition at line 1750 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_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 1834 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, test_value_range4_queries, and tout.
| DEFINE_TESTCASE | ( | qp_value_stringrange1 | , |
| ! | backend | ||
| ) |
Definition at line 2055 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, test_value_stringrange1_queries, and tout.
| 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_or_queries, TEST_STRINGS_EQUAL, and tout.
| DEFINE_TESTCASE | ( | wildquery1 | , |
| backend | |||
| ) |
Definition at line 1264 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.
|
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 1735 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 2453 of file api_queryparser.cc.
References Xapian::WritableDatabase::add_spelling().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2758 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 2740 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.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2215 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2277 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2498 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2370 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2461 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2576 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2831 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 48 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2902 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1358 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2669 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2704 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1311 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2988 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2977 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2615 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2526 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2112 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1896 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1960 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1515 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1596 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 1821 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 2048 of file api_queryparser.cc.
Referenced by DEFINE_TESTCASE().