26 #ifndef OM_HGUARD_OMENQUIREINTERNAL_H
27 #define OM_HGUARD_OMENQUIREINTERNAL_H
39 #include <unordered_map>
173 vector<Xapian::Internal::opt_intrusive_ptr<MatchSpy>>
spies;
238 vector<Xapian::Internal::MSetItem>
items;
280 double max_possible_,
281 double max_attained_,
282 vector<Xapian::Internal::MSetItem> &items_,
283 double percent_factor_)
295 std::swap(
items, items_);
306 std::string
snippet(
const std::string & text,
size_t length,
309 const std::string & hi_start,
310 const std::string & hi_end,
311 const std::string & omit)
const;
This class is used to access a database, or a group of databases.
A handle representing a document in a Xapian database.
Class representing a list of search results.
Internals of enquire system.
void operator=(const Internal &)
Assignment not allowed.
void set_query(const Query &query_, termcount qlen_)
vector< Xapian::Internal::opt_intrusive_ptr< MatchSpy > > spies
MSet get_mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, const RSet *omrset, const MatchDecider *mdecider) const
const Xapian::Database db
The database which this enquire object uses.
Xapian::Document read_doc(const Xapian::Internal::MSetItem &item) const
Read a previously requested document from the database.
const Query & get_query() const
TermIterator get_matching_terms(Xapian::docid did) const
ESet get_eset(Xapian::termcount maxitems, const RSet &omrset, int flags, const ExpandDecider *edecider, double min_wt) const
string get_description() const
Internal(const Internal &)
Copy not allowed.
Xapian::valueno collapse_key
void request_doc(const Xapian::Internal::MSetItem &item) const
Request a document from the database.
termcount qlen
The query length.
Xapian::doccount collapse_max
double expand_k
The parameter required for TradWeight query expansion.
Xapian::Document get_document(const Xapian::Internal::MSetItem &item) const
std::string eweightname
The weighting scheme to use for query expansion.
Xapian::doccount get_termfreq(const string &tname) const
Xapian::Internal::opt_intrusive_ptr< KeyMaker > sorter
Xapian::Enquire::docid_order order
Query query
The user's query.
Weight * weight
The weight to use for this query.
docid_order
Ordering of docids.
Virtual base class for expand decider functor.
An item resulting from a query.
Xapian::doccount collapse_count
Count of collapses done on collapse_key so far.
MSetItem(double wt_, Xapian::docid did_, const string &key_)
string get_description() const
Return a string describing this object.
double wt
Weight calculated.
MSetItem(double wt_, Xapian::docid did_, const string &key_, Xapian::doccount collapse_count_)
string collapse_key
Value which was used to collapse upon.
Xapian::docid did
Document id.
string sort_key
Used when sorting by value.
MSetItem(double wt_, Xapian::docid did_)
Base class for objects managed by intrusive_ptr.
A smart pointer that uses intrusive reference counting.
A smart pointer that optionally uses intrusive reference counting.
Iterator over a Xapian::MSet.
void operator=(const Internal &)
Assignment not allowed.
Xapian::doccount uncollapsed_upper_bound
int convert_to_percent_internal(double wt) const
Converts a weight to a percentage weight.
Xapian::Internal::intrusive_ptr< const Enquire::Internal > enquire
Xapian::Enquire reference, for getting documents.
std::unordered_map< std::string, double > snippet_bg_relevance
double percent_factor
Factor to multiply weights by to convert them to percentages.
string get_description() const
Return a string describing this object.
map< Xapian::doccount, Xapian::Document > indexeddocs
Cache of documents, indexed by MSet index.
void read_docs() const
Read and cache the documents so far requested.
Xapian::doccount uncollapsed_lower_bound
Xapian::doccount matches_estimated
Xapian::Document get_doc_by_index(Xapian::doccount index) const
get a document by index in MSet, via the cache.
Xapian::doccount firstitem
Rank of first item in MSet.
void fetch_items(Xapian::doccount first, Xapian::doccount last) const
Fetch items specified into the document cache.
Xapian::doccount matches_lower_bound
vector< Xapian::Internal::MSetItem > items
A list of items comprising the (selected part of the) MSet.
Internal(const Internal &)
Copy not allowed.
set< Xapian::doccount > requested_docs
The set of documents which have been requested but not yet collected.
std::string snippet(const std::string &text, size_t length, const Xapian::Stem &stemmer, unsigned flags, const std::string &hi_start, const std::string &hi_end, const std::string &omit) const
Internal(Xapian::doccount firstitem_, Xapian::doccount matches_upper_bound_, Xapian::doccount matches_lower_bound_, Xapian::doccount matches_estimated_, Xapian::doccount uncollapsed_upper_bound_, Xapian::doccount uncollapsed_lower_bound_, Xapian::doccount uncollapsed_estimated_, double max_possible_, double max_attained_, vector< Xapian::Internal::MSetItem > &items_, double percent_factor_)
Note: destroys parameter items.
Xapian::doccount matches_upper_bound
Xapian::Weight::Internal * stats
Provides the term frequency and weight for each term in the query.
Xapian::doccount uncollapsed_estimated
Class representing a list of search results.
Base class for matcher decision functor.
Class representing a query.
string get_description() const
Return a string describing this object.
set< Xapian::docid > items
Items in the relevance set.
const set< Xapian::docid > & get_items() const
Class representing a stemming algorithm.
Class for iterating over a list of terms.
Class to hold statistics for a given collection.
Abstract base class for weighting schemes.
API for working with Xapian databases.
API for working with documents.
Build key strings for MSet ordering or collapsing.
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.
static Xapian::Stem stemmer
Xapian::Weight::Internal class, holding database and term statistics.