22 #ifndef XAPIAN_INCLUDED_ENQUIRE_H
23 #define XAPIAN_INCLUDED_ENQUIRE_H
25 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
26 # error Never use <xapian/enquire.h> directly; include <xapian.h> instead.
112 const Query& get_query()
const;
124 void set_weighting_scheme(
const Weight& weight);
163 void set_docid_order(docid_order order);
169 void set_sort_by_relevance();
184 void set_sort_by_value(
valueno sort_key,
bool reverse);
192 void set_sort_by_key(
KeyMaker* sorter,
209 void set_sort_by_value_then_relevance(
valueno sort_key,
bool reverse);
218 void set_sort_by_key_then_relevance(
KeyMaker* sorter,
247 void set_sort_by_relevance_then_value(
valueno sort_key,
bool reverse);
269 void set_sort_by_relevance_then_key(
KeyMaker* sorter,
302 void set_collapse_key(
valueno collapse_key,
doccount collapse_max = 1);
312 void set_cutoff(
int percent_threshold,
double weight_threshold = 0);
339 void clear_matchspies();
358 void set_time_limit(
double time_limit);
386 const RSet* rset = NULL,
408 return get_mset(first, maxitems, 0, rset, mdecider);
431 return get_matching_terms_begin(*it);
460 void set_expansion_scheme(std::string_view eweightname,
461 double expand_k = 1.0)
const;
469 static const int INCLUDE_QUERY_TERMS = 1;
479 static const int USE_EXACT_TERMFREQ = 2;
505 double min_weight = 0.0)
const;
524 return get_eset(maxitems, rset, 0, edecider);
528 std::string get_description()
const;
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())
Compiler attribute macros.
#define XAPIAN_NONNULL(LIST)
Annotate function parameters which should be non-NULL pointers.
An indexed database of documents.
Class representing a list of search results.
TermIterator get_matching_terms_begin(const MSetIterator &it) const
Iterate query terms matching a document.
Enquire(const Enquire &o)
Copying is allowed.
Enquire(Enquire &&o)
Move constructor.
ESet get_eset(termcount maxitems, const RSet &rset, const ExpandDecider *edecider) const
Perform query expansion.
Enquire & operator=(const Enquire &o)
Copying is allowed.
TermIterator get_matching_terms_end(const MSetIterator &) const noexcept
End iterator corresponding to get_matching_terms_begin().
Enquire & operator=(Enquire &&o)
Move assignment operator.
MSet get_mset(doccount first, doccount maxitems, const RSet *rset, const MatchDecider *mdecider=NULL) const
Run the query.
TermIterator get_matching_terms_end(docid) const noexcept
End iterator corresponding to get_matching_terms_begin().
Virtual base class for expand decider functor.
Virtual base class for key making functors.
Iterator over a Xapian::MSet.
Class representing a list of search results.
Abstract base class for match deciders.
Abstract base class for match spies.
Class representing a query.
Class representing a set of documents judged as relevant.
Class for iterating over a list of terms.
Abstract base class for weighting schemes.
Class representing a list of query expansion terms.
Class representing a list of search results.
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned valueno
The number for a value slot in a document.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Class for iterating over a list of terms.
Define XAPIAN_VISIBILITY_* macros.
#define XAPIAN_VISIBILITY_DEFAULT