xapian-core
1.4.22
|
Tests of the OP_VALUE_* query operators. More...
#include <config.h>
#include "api_opvalue.h"
#include <xapian.h>
#include "apitest.h"
#include "testsuite.h"
#include "testutils.h"
#include <string>
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (valuerange1, backend) | |
DEFINE_TESTCASE (valuerange2, writable) | |
static void | make_valuerange5 (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange5, generated) | |
static void | make_singularvalue_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange6, generated) | |
static void | make_valprefixbounds_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange7, generated) | |
DEFINE_TESTCASE (valuege1, backend) | |
DEFINE_TESTCASE (valuege2, backend) | |
DEFINE_TESTCASE (valuele1, backend) | |
DEFINE_TESTCASE (valuege3, !backend) | |
DEFINE_TESTCASE (valuege4, backend) | |
DEFINE_TESTCASE (valuerange3, backend) | |
DEFINE_TESTCASE (valuerange4, backend) | |
DEFINE_TESTCASE (valuerangematchesub1, backend) | |
Test improved upper bound and estimate in 1.4.3. More... | |
Tests of the OP_VALUE_* query operators.
Definition in file api_opvalue.cc.
DEFINE_TESTCASE | ( | valuerange1 | , |
backend | |||
) |
Definition at line 39 of file api_opvalue.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Database::get_document(), Xapian::Database::get_lastdocid(), Xapian::Enquire::get_mset(), Xapian::Document::get_value(), Xapian::Query::OP_VALUE_RANGE, query(), Xapian::Enquire::set_query(), TEST, TEST_REL, and tout.
DEFINE_TESTCASE | ( | valuerange2 | , |
writable | |||
) |
Definition at line 73 of file api_opvalue.cc.
References Xapian::Document::add_value(), Xapian::Enquire::get_mset(), get_writable_database(), Xapian::Query::OP_VALUE_LE, query(), Xapian::WritableDatabase::replace_document(), Xapian::Document::set_data(), Xapian::Enquire::set_query(), Xapian::MSet::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuerange5 | , |
generated | |||
) |
Definition at line 100 of file api_opvalue.cc.
References get_database(), Xapian::MSet::get_matches_estimated(), Xapian::Database::get_value_lower_bound(), make_valuerange5(), Xapian::Query::OP_VALUE_RANGE, query(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuerange6 | , |
generated | |||
) |
Definition at line 132 of file api_opvalue.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(), make_singularvalue_db(), Xapian::Query::OP_VALUE_RANGE, query(), Xapian::Enquire::set_query(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuerange7 | , |
generated | |||
) |
Definition at line 252 of file api_opvalue.cc.
References get_database(), get_dbtype(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), make_valprefixbounds_db(), Xapian::Query::OP_VALUE_RANGE, query(), Xapian::Enquire::set_query(), startswith(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuege1 | , |
backend | |||
) |
Definition at line 284 of file api_opvalue.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Database::get_document(), Xapian::Database::get_lastdocid(), Xapian::Enquire::get_mset(), Xapian::Document::get_value(), Xapian::Query::OP_VALUE_GE, query(), Xapian::Enquire::set_query(), TEST_REL, and tout.
DEFINE_TESTCASE | ( | valuege2 | , |
backend | |||
) |
Definition at line 317 of file api_opvalue.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_VALUE_GE, query(), and Xapian::Enquire::set_query().
DEFINE_TESTCASE | ( | valuele1 | , |
backend | |||
) |
Definition at line 328 of file api_opvalue.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Database::get_document(), Xapian::Database::get_lastdocid(), Xapian::Enquire::get_mset(), Xapian::Document::get_value(), Xapian::Query::OP_VALUE_LE, query(), Xapian::Enquire::set_query(), and TEST_REL.
DEFINE_TESTCASE | ( | valuege3 | , |
! | backend | ||
) |
Definition at line 358 of file api_opvalue.cc.
References Xapian::Query::get_description(), Xapian::Query::MatchAll, Xapian::Query::OP_VALUE_GE, query(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | valuege4 | , |
backend | |||
) |
Definition at line 364 of file api_opvalue.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_VALUE_GE, query(), and Xapian::Enquire::set_query().
DEFINE_TESTCASE | ( | valuerange3 | , |
backend | |||
) |
Definition at line 379 of file api_opvalue.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_VALUE_RANGE, query(), and Xapian::Enquire::set_query().
DEFINE_TESTCASE | ( | valuerange4 | , |
backend | |||
) |
Definition at line 391 of file api_opvalue.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_VALUE_RANGE, query(), and Xapian::Enquire::set_query().
DEFINE_TESTCASE | ( | valuerangematchesub1 | , |
backend | |||
) |
Test improved upper bound and estimate in 1.4.3.
Definition at line 403 of file api_opvalue.cc.
References get_database(), Xapian::Database::get_doccount(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::Enquire::get_mset(), Xapian::Database::get_value_freq(), Xapian::Query::OP_VALUE_RANGE, query(), Xapian::Enquire::set_query(), TEST_EQUAL, and TEST_REL.
|
static |
Definition at line 122 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 241 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 90 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().