47 vector<Xapian::Query> subqs;
151 mset_expect_order(mymset, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
162 mset_expect_order(mymset, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
174 mset_expect_order(mymset, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
186 vector<Xapian::Query> subqs;
199 #if 0 // Disable until we reimplement this. 236 vector<Xapian::Query> subqs;
423 vector<Xapian::Query> subqs;
436 #if 0 // Disable until we reimplement this. 470 string term =
stemmer(
"sponge");
617 SKIP_TEST(
"TermList::positionlist_count() not yet implemented for this backend");
Xapian::Document get_document(Xapian::docid did) const
Get a document from the database, given its document id.
Xapian::docid add_document(const Xapian::Document &document)
Add a new document to the database.
PositionIterator positionlist_end(Xapian::docid, const std::string &) const
Corresponding end iterator to positionlist_begin().
TermIterator termlist_begin(Xapian::docid did) const
An iterator pointing to the start of the termlist for a given document.
#define TEST(a)
Test a condition, without an additional explanation for failure.
void skip_to(Xapian::termpos termpos)
Advance the iterator to term position termpos.
This class is used to access a database, or a group of databases.
Class representing a stemming algorithm.
PositionIterator positionlist_begin(Xapian::docid did, const std::string &tname) const
An iterator pointing to the start of the position list for a given term in a given document...
Xapian::WritableDatabase get_writable_database(const string &dbname)
a generic test suite engine
Class representing a list of search results.
MSet get_mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount checkatleast=0, const RSet *omrset=0, const MatchDecider *mdecider=0) const
Get (a portion of) the match set for the current query.
void replace_document(Xapian::docid did, const Xapian::Document &document)
Replace a given document in the database.
static Xapian::Stem stemmer
test functionality of the Xapian API
Class for iterating over a list of terms.
PositionIterator positionlist_end() const
Return an end PositionIterator for the current term.
#define TEST_NOT_EQUAL(a, b)
Test for non-equality of two things.
Class implementing a "boolean" weighting scheme.
This class provides read/write access to a database.
Match only documents where all subqueries match near and in order.
Public interfaces for the Xapian library.
void delete_document(Xapian::docid did)
Delete a document from the database.
#define TEST_EXCEPTION(TYPE, CODE)
Check that CODE throws exactly Xapian exception TYPE.
Class for iterating over term positions.
TermIterator termlist_end(Xapian::docid) const
Corresponding end iterator to termlist_begin().
void set_query(const Xapian::Query &query, Xapian::termcount qlen=0)
Set the query to run.
void add_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfinc=1)
Add an occurrence of a term at a particular position.
Match only documents which all subqueries match.
Xapian::Database get_database(const string &dbname)
#define SKIP_TEST(MSG)
Skip the current testcase with message MSG.
This class provides an interface to the information retrieval system for the purpose of searching...
Match only documents where all subqueries match near each other.
Xapian-specific test helper functions and macros.
void mset_expect_order(const Xapian::MSet &A, Xapian::docid d1, Xapian::docid d2, Xapian::docid d3, Xapian::docid d4, Xapian::docid d5, Xapian::docid d6, Xapian::docid d7, Xapian::docid d8, Xapian::docid d9, Xapian::docid d10, Xapian::docid d11, Xapian::docid d12)
void set_weighting_scheme(const Weight &weight_)
Set the weighting scheme to use for queries.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Class representing a query.
DEFINE_TESTCASE(near1, positional)
Simple test of NEAR.
#define TEST_EQUAL(a, b)
Test for equality of two things.
PositionIterator positionlist_begin() const
Return a PositionIterator for the current term.
A handle representing a document in a Xapian database.
void remove_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfdec=1)
Remove a posting of a term from the document.
UnimplementedError indicates an attempt to use an unimplemented feature.
void add_term(const std::string &tname, Xapian::termcount wdfinc=1)
Add a term to the document, without positional information.