xapian-core
1.4.27
|
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, backend) | |
static void | make_valuerange5 (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange5, backend) | |
static void | make_singularvalue_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange6, backend) | |
static void | make_valprefixbounds_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valuerange7, backend) | |
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 | , |
backend | |||
) |
Definition at line 73 of file api_opvalue.cc.
References Xapian::Document::add_value(), get_database(), Xapian::Query::OP_VALUE_LE, query(), Xapian::WritableDatabase::replace_document(), Xapian::Document::set_data(), Xapian::MSet::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuerange5 | , |
backend | |||
) |
Definition at line 103 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 | , |
backend | |||
) |
Definition at line 135 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 | , |
backend | |||
) |
Definition at line 255 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_valprefixbounds_db(), Xapian::Query::OP_VALUE_RANGE, query(), Xapian::Enquire::set_query(), Xapian::Database::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuege1 | , |
backend | |||
) |
Definition at line 287 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 320 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 331 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 361 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 367 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 382 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 394 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 406 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 125 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 244 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 93 of file api_opvalue.cc.
References Xapian::WritableDatabase::add_document(), and Xapian::Document::add_value().
Referenced by DEFINE_TESTCASE().