26 #define XAPIAN_DEPRECATED(D) D
46 const string& desc = decreasingvalueweightpostingsource.
get_description();
50 startswith(desc,
"Xapian::DecreasingValueWeightPostingSource("));
51 TEST(desc.back() ==
')');
60 startswith(desc,
"Xapian::FixedWeightPostingSource("));
61 TEST(desc.back() ==
')');
82 TEST(desc.back() ==
')');
92 startswith(desc,
"Xapian::ValueCountMatchSpy("));
93 TEST(desc.back() ==
')');
101 startswith(desc,
"Xapian::ValueMapPostingSource("));
102 TEST(desc.back() ==
')');
108 tout << desc <<
'\n';
110 startswith(desc,
"Xapian::ValuePostingSource("));
111 TEST(desc.back() ==
')');
117 tout << desc <<
'\n';
119 startswith(desc,
"Xapian::ValueWeightPostingSource("));
120 TEST(desc.back() ==
')');
132 database = copy_database;
134 copy_database = std::move(move_database);
143 document = copy_document;
145 copy_document = std::move(move_document);
156 copy_eset = std::move(move_eset);
165 esetiterator = copy_esetiterator;
167 copy_esetiterator = std::move(move_esetiterator);
170 #ifdef XAPIAN_HAS_INMEMORY_BACKEND
177 enquire = copy_enquire;
179 copy_enquire = std::move(move_enquire);
191 copy_mset = std::move(move_mset);
200 msetiterator = copy_msetiterator;
202 copy_msetiterator = std::move(move_msetiterator);
211 positioniterator = copy_positioniterator;
213 copy_positioniterator = std::move(move_positioniterator);
222 postingiterator = copy_postingiterator;
224 copy_postingiterator = std::move(move_postingiterator);
235 copy_query = std::move(move_query);
244 queryparser = copy_queryparser;
246 copy_queryparser = std::move(move_queryparser);
257 copy_rset = std::move(move_rset);
263 registry = copy_registry;
264 copy_registry = std::move(move_registry);
274 copy_stem = std::move(move_stem);
283 termgenerator = copy_termgenerator;
285 copy_termgenerator = std::move(move_termgenerator);
294 termiterator = copy_termiterator;
296 copy_termiterator = std::move(move_termiterator);
302 utf8iterator = copy_utf8iterator;
303 copy_utf8iterator = std::move(move_utf8iterator);
311 valueiterator = copy_valueiterator;
313 copy_valueiterator = std::move(move_valueiterator);
322 writabledatabase = copy_writabledatabase;
324 copy_writabledatabase = std::move(move_writabledatabase);
332 using traits = iterator_traits<Xapian::ESetIterator>;
333 using pointer_base = std::remove_pointer<traits::pointer>::type;
334 using reference_base = std::remove_reference<traits::reference>::type;
335 static_assert(is_same<decltype(*std::declval<Xapian::ESetIterator>()),
336 pointer_base>::value,
337 "iterator_traits<ESetIterator>::pointer inconsistent with "
338 "type from dereferencing ESetIterator");
339 static_assert(is_same<decltype(*std::declval<Xapian::ESetIterator>()),
340 reference_base>::value,
341 "iterator_traits<ESetIterator>::reference inconsistent with "
342 "type from dereferencing ESetIterator");
345 using traits = iterator_traits<Xapian::MSetIterator>;
346 using pointer_base = std::remove_pointer<traits::pointer>::type;
347 using reference_base = std::remove_reference<traits::reference>::type;
348 static_assert(is_same<decltype(*std::declval<Xapian::MSetIterator>()),
349 pointer_base>::value,
350 "iterator_traits<MSetIterator>::pointer inconsistent with "
351 "type from dereferencing MSetIterator");
352 static_assert(is_same<decltype(*std::declval<Xapian::MSetIterator>()),
353 reference_base>::value,
354 "iterator_traits<MSetIterator>::reference inconsistent with "
355 "type from dereferencing MSetIterator");
358 using traits = iterator_traits<Xapian::PositionIterator>;
359 using pointer_base = std::remove_pointer<traits::pointer>::type;
360 using reference_base = std::remove_reference<traits::reference>::type;
361 static_assert(is_same<decltype(*std::declval<Xapian::PositionIterator>()),
362 pointer_base>::value,
363 "iterator_traits<PositionIterator>::pointer inconsistent with "
364 "type from dereferencing PositionIterator");
365 static_assert(is_same<decltype(*std::declval<Xapian::PositionIterator>()),
366 reference_base>::value,
367 "iterator_traits<PositionIterator>::reference inconsistent with "
368 "type from dereferencing PositionIterator");
371 using traits = iterator_traits<Xapian::PostingIterator>;
372 using pointer_base = std::remove_pointer<traits::pointer>::type;
373 using reference_base = std::remove_reference<traits::reference>::type;
374 static_assert(is_same<decltype(*std::declval<Xapian::PostingIterator>()),
375 pointer_base>::value,
376 "iterator_traits<PostingIterator>::pointer inconsistent with "
377 "type from dereferencing PostingIterator");
378 static_assert(is_same<decltype(*std::declval<Xapian::PostingIterator>()),
379 reference_base>::value,
380 "iterator_traits<PostingIterator>::reference inconsistent with "
381 "type from dereferencing PostingIterator");
384 using traits = iterator_traits<Xapian::TermIterator>;
385 using pointer_base = std::remove_pointer<traits::pointer>::type;
386 using reference_base = std::remove_reference<traits::reference>::type;
387 static_assert(is_same<decltype(*std::declval<Xapian::TermIterator>()),
388 pointer_base>::value,
389 "iterator_traits<TermIterator>::pointer inconsistent with "
390 "type from dereferencing TermIterator");
391 static_assert(is_same<decltype(*std::declval<Xapian::TermIterator>()),
392 reference_base>::value,
393 "iterator_traits<TermIterator>::reference inconsistent with "
394 "type from dereferencing TermIterator");
397 using traits = iterator_traits<Xapian::Utf8Iterator>;
398 using pointer_base = std::remove_pointer<traits::pointer>::type;
399 using reference_base = std::remove_reference<traits::reference>::type;
400 static_assert(is_same<decltype(*std::declval<Xapian::Utf8Iterator>()),
401 pointer_base>::value,
402 "iterator_traits<Utf8Iterator>::pointer inconsistent with "
403 "type from dereferencing Utf8Iterator");
404 static_assert(is_same<decltype(*std::declval<Xapian::Utf8Iterator>()),
405 reference_base>::value,
406 "iterator_traits<Utf8Iterator>::reference inconsistent with "
407 "type from dereferencing Utf8Iterator");
410 using traits = iterator_traits<Xapian::ValueIterator>;
411 using pointer_base = std::remove_pointer<traits::pointer>::type;
412 using reference_base = std::remove_reference<traits::reference>::type;
413 static_assert(is_same<decltype(*std::declval<Xapian::ValueIterator>()),
414 pointer_base>::value,
415 "iterator_traits<ValueIterator>::pointer inconsistent with "
416 "type from dereferencing ValueIterator");
417 static_assert(is_same<decltype(*std::declval<Xapian::ValueIterator>()),
418 reference_base>::value,
419 "iterator_traits<ValueIterator>::reference inconsistent with "
420 "type from dereferencing ValueIterator");
428 std::remove_pointer<Xapian::ESet::pointer>::type;
429 using reference_base =
430 std::remove_reference<Xapian::ESet::reference>::type;
432 static_assert(is_same<value_type, pointer_base>::value,
433 "Xapian::ESet::pointer inconsistent with "
434 "Xapian::ESet::value_type");
435 static_assert(is_same<value_type, reference_base>::value,
436 "Xapian::ESet::reference inconsistent with "
437 "Xapian::ESet::value_type");
441 std::remove_pointer<Xapian::MSet::pointer>::type;
442 using reference_base =
443 std::remove_reference<Xapian::MSet::reference>::type;
445 static_assert(is_same<value_type, pointer_base>::value,
446 "Xapian::MSet::pointer inconsistent with "
447 "Xapian::MSet::value_type");
448 static_assert(is_same<value_type, reference_base>::value,
449 "Xapian::MSet::reference inconsistent with "
450 "Xapian::MSet::value_type");
static Xapian::Query query(Xapian::Query::op op, const string &t1=string(), const string &t2=string(), const string &t3=string(), const string &t4=string(), const string &t5=string(), const string &t6=string(), const string &t7=string(), const string &t8=string(), const string &t9=string(), const string &t10=string())
DEFINE_TESTCASE(defaultctor1, !backend)
Check uncopyable API classes which should have a default ctor actually do.
test functionality of the Xapian API
This class implements the BB2 weighting scheme.
Xapian::Weight subclass implementing the BM25+ probabilistic formula.
Xapian::Weight subclass implementing the BM25 probabilistic formula.
Class implementing a "boolean" weighting scheme.
Xapian::Weight subclass implementing Coordinate Matching.
This class implements the DLH weighting scheme, which is a representative scheme of the Divergence fr...
This class implements the DPH weighting scheme.
An indexed database of documents.
virtual std::string get_description() const
Return a string describing this object.
Read weights from a value which is known to decrease as docid increases.
std::string get_description() const override
Return a string describing this object.
Xapian::Weight subclass implementing Dice Coefficient.
Class representing a document.
std::string get_description() const
Return a string describing this object.
Iterator over a Xapian::ESet.
std::string get_description() const
Return a string describing this object.
Class representing a list of search results.
std::string get_description() const
Return a string describing this object.
Xapian::ESetIterator value_type
std::string get_description() const
Return a string describing this object.
A posting source which returns a fixed weight for all documents.
std::string get_description() const override
Return a string describing this object.
This class implements the IfB2 weighting scheme.
This class implements the InL2 weighting scheme.
This class implements the IneB2 weighting scheme.
Language Model weighting with Two Stage smoothing.
Language Model weighting with Absolute Discount smoothing.
Language Model weighting with Dirichlet or Dir+ smoothing.
Language Model weighting with Jelinek-Mercer smoothing.
Iterator over a Xapian::MSet.
std::string get_description() const
Return a string describing this object.
Class representing a list of search results.
Xapian::MSetIterator value_type
std::string get_description() const
Return a string describing this object.
KeyMaker subclass which combines several values.
Xapian::Weight subclass implementing the PL2+ probabilistic formula.
This class implements the PL2 weighting scheme.
Class for iterating over term positions.
std::string get_description() const
Return a string describing this object.
Class for iterating over a list of terms.
std::string get_description() const
Return a string describing this object.
Build a Xapian::Query object from a user query string.
std::string get_description() const
Return a string describing this object.
Class representing a query.
std::string get_description() const
Return a string describing this object.
Class representing a set of documents judged as relevant.
std::string get_description() const
Return a string describing this object.
Base class for range processors.
Registry for user subclasses.
Simple implementation of Stopper class - this will suit most users.
virtual std::string get_description() const
Return a string describing this object.
Class representing a stemming algorithm.
std::string get_description() const
Return a string describing this object.
Parses a piece of text and generate terms.
std::string get_description() const
Return a string describing this object.
Class for iterating over a list of terms.
std::string get_description() const
Return a string describing this object.
Xapian::Weight subclass implementing the tf-idf weighting scheme.
Xapian::Weight subclass implementing the traditional probabilistic formula.
An iterator which returns Unicode character values from a UTF-8 encoded string.
Class for counting the frequencies of values in the matching documents.
virtual std::string get_description() const
Return a string describing this object.
Class for iterating over document values.
std::string get_description() const
Return a string describing this object.
A posting source which looks up weights in a map using values as the key.
std::string get_description() const override
Return a string describing this object.
A posting source which generates weights from a value slot.
std::string get_description() const
Return a string describing this object.
A posting source which reads weights from a value slot.
std::string get_description() const
Return a string describing this object.
This class provides read/write access to a database.
std::string get_description() const
Return a string describing this object.
const int DB_BACKEND_INMEMORY
Use the "in memory" backend.
bool startswith(std::string_view s, char pfx)
std::ostringstream tout
The debug printing stream.
#define TEST(a)
Test a condition, without an additional explanation for failure.
Xapian-specific test helper functions and macros.
Public interfaces for the Xapian library.