xapian-core  2.0.0
Classes | Functions
api_queryopt.cc File Reference

Tests of the query optimiser. More...

#include <config.h>
#include "api_queryopt.h"
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
#include <vector>
+ Include dependency graph for api_queryopt.cc:

Go to the source code of this file.

Classes

class  MyDontUsePostingSource
 

Functions

 DEFINE_TESTCASE (boolandmaybe1, backend &&!remote)
 Test that ANDMAYBE branches are ignored if their weight factor is 0. More...
 
 DEFINE_TESTCASE (boolandmaybe2, backend)
 Test that ANDMAYBE branches return same documents and lists of matching terms when their weight factor is 0. More...
 

Detailed Description

Tests of the query optimiser.

Definition in file api_queryopt.cc.

Function Documentation

◆ DEFINE_TESTCASE() [1/2]

DEFINE_TESTCASE ( boolandmaybe1  ,
backend &&!  remote 
)

Test that ANDMAYBE branches are ignored if their weight factor is 0.

Definition at line 82 of file api_queryopt.cc.

References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::MatchAll, Xapian::Query::OP_AND_MAYBE, query(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_weighting_scheme().

◆ DEFINE_TESTCASE() [2/2]

DEFINE_TESTCASE ( boolandmaybe2  ,
backend   
)

Test that ANDMAYBE branches return same documents and lists of matching terms when their weight factor is 0.

Definition at line 101 of file api_queryopt.cc.

References get_database(), Xapian::Enquire::get_matching_terms_begin(), Xapian::Enquire::get_matching_terms_end(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND_MAYBE, query(), Xapian::Enquire::set_query(), Xapian::MSet::size(), Heap::sort(), TEST, and TEST_EQUAL.