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;
236 vector<Xapian::Query> subqs;
423 vector<Xapian::Query> subqs;
470 string term =
stemmer(
"sponge");
617 SKIP_TEST(
"TermList::positionlist_count() not yet implemented for this backend");
DEFINE_TESTCASE(near1, positional)
Simple test of NEAR.
Xapian::WritableDatabase get_writable_database(const string &dbname)
Xapian::Database get_database(const string &dbname)
test functionality of the Xapian API
Class implementing a "boolean" weighting scheme.
This class is used to access a database, or a group of databases.
TermIterator termlist_begin(Xapian::docid did) const
An iterator pointing to the start of the termlist for a given document.
Xapian::Document get_document(Xapian::docid did) const
Get a document from the database, given its document id.
TermIterator termlist_end(Xapian::docid) const
Corresponding end iterator to termlist_begin().
PositionIterator positionlist_end(Xapian::docid, const std::string &) const
Corresponding end iterator to positionlist_begin().
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.
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.
void add_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfinc=1)
Add an occurrence of a term at a particular position.
void add_term(const std::string &tname, Xapian::termcount wdfinc=1)
Add a term to the document, without positional information.
TermIterator termlist_begin() const
Start iterating the terms in this document.
This class provides an interface to the information retrieval system for the purpose of searching.
void set_query(const Xapian::Query &query, Xapian::termcount qlen=0)
Set the query to run.
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 set_weighting_scheme(const Weight &weight_)
Set the weighting scheme to use for queries.
Class representing a list of search results.
Class for iterating over term positions.
void skip_to(Xapian::termpos termpos)
Advance the iterator to term position termpos.
Class representing a query.
@ OP_NEAR
Match only documents where all subqueries match near each other.
@ OP_AND
Match only documents which all subqueries match.
@ OP_PHRASE
Match only documents where all subqueries match near and in order.
Class representing a stemming algorithm.
Class for iterating over a list of terms.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
void skip_to(const std::string &term)
Advance the iterator to term term.
PositionIterator positionlist_end() const
Return an end PositionIterator for the current term.
PositionIterator positionlist_begin() const
Return a PositionIterator for the current term.
UnimplementedError indicates an attempt to use an unimplemented feature.
This class provides read/write access to a database.
void delete_document(Xapian::docid did)
Delete a document from the database.
void replace_document(Xapian::docid did, const Xapian::Document &document)
Replace a given document in the database.
Xapian::docid add_document(const Xapian::Document &document)
Add a new document to the database.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
static Xapian::Stem stemmer
a generic test suite engine
#define SKIP_TEST(MSG)
Skip the current testcase with message MSG.
#define TEST_EQUAL(a, b)
Test for equality of two things.
#define TEST(a)
Test a condition, without an additional explanation for failure.
#define TEST_NOT_EQUAL(a, b)
Test for non-equality of two things.
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)
Xapian-specific test helper functions and macros.
#define TEST_EXCEPTION(TYPE, CODE)
Check that CODE throws exactly Xapian exception TYPE.
Public interfaces for the Xapian library.