xapian-core
1.4.27
|
#include <multimatch.h>
Public Member Functions | |
MultiMatch (const Xapian::Database &db_, const Xapian::Query &query, Xapian::termcount qlen, const Xapian::RSet *omrset, Xapian::doccount collapse_max_, Xapian::valueno collapse_key_, int percent_cutoff_, double weight_cutoff_, Xapian::Enquire::docid_order order_, Xapian::valueno sort_key_, Xapian::Enquire::Internal::sort_setting sort_by_, bool sort_value_forward_, double time_limit_, Xapian::Weight::Internal &stats, const Xapian::Weight *wtscheme, const vector< Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpy >> &matchspies_, bool have_sorter, bool have_mdecider) | |
MultiMatch constructor. More... | |
void | get_mset (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, Xapian::MSet &mset, Xapian::Weight::Internal &stats, const Xapian::MatchDecider *mdecider, const Xapian::KeyMaker *sorter) |
Run the match and generate an MSet object. More... | |
void | recalc_maxweight () |
Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is smaller. More... | |
bool | full_db_has_positions () const |
Private Member Functions | |
double | getorrecalc_maxweight (PostList *pl) |
get the maxweight that the postlist pl may return, calling recalc_maxweight if recalculate_w_max is set, and unsetting it. More... | |
MultiMatch (const MultiMatch &) | |
Copying is not permitted. More... | |
void | operator= (const MultiMatch &) |
Assignment is not permitted. More... | |
Private Attributes | |
std::vector< Xapian::Internal::intrusive_ptr< SubMatch > > | leaves |
Vector of the items. More... | |
const Xapian::Database | db |
Xapian::Query | query |
Xapian::doccount | collapse_max |
Xapian::valueno | collapse_key |
int | percent_cutoff |
double | weight_cutoff |
Xapian::Enquire::docid_order | order |
Xapian::valueno | sort_key |
Xapian::Enquire::Internal::sort_setting | sort_by |
bool | sort_value_forward |
double | time_limit |
const Xapian::Weight * | weight |
Weighting scheme. More... | |
bool | recalculate_w_max |
Internal flag to note that w_max needs to be recalculated while query is running. More... | |
vector< bool > | is_remote |
Is each sub-database remote? More... | |
const vector< Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpy > > & | matchspies |
The matchspies to use. More... | |
Definition at line 34 of file multimatch.h.
|
private |
Copying is not permitted.
MultiMatch::MultiMatch | ( | const Xapian::Database & | db_, |
const Xapian::Query & | query, | ||
Xapian::termcount | qlen, | ||
const Xapian::RSet * | omrset, | ||
Xapian::doccount | collapse_max_, | ||
Xapian::valueno | collapse_key_, | ||
int | percent_cutoff_, | ||
double | weight_cutoff_, | ||
Xapian::Enquire::docid_order | order_, | ||
Xapian::valueno | sort_key_, | ||
Xapian::Enquire::Internal::sort_setting | sort_by_, | ||
bool | sort_value_forward_, | ||
double | time_limit_, | ||
Xapian::Weight::Internal & | stats, | ||
const Xapian::Weight * | wtscheme, | ||
const vector< Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpy >> & | matchspies_, | ||
bool | have_sorter, | ||
bool | have_mdecider | ||
) |
MultiMatch constructor.
db_ | The database to use. |
query | The query |
qlen | The query length |
omrset | The relevance set (or NULL for no RSet) |
time_limit_ | Seconds to reduce check_at_least after (or <= 0 for no limit) |
stats | The stats object to add our stats to. |
wtscheme | Weighting scheme |
matchspies_ | Any the MatchSpy objects in use. |
have_sorter | Is there a sorter in use? |
have_mdecider | Is there a Xapian::MatchDecider in use? |
Definition at line 277 of file multimatch.cc.
References Assert, BACKEND_REMOTE, collapse_key, collapse_max, db, Xapian::Query::empty(), Xapian::Database::Internal::get_backend_info(), Xapian::Database::internal, is_remote, leaves, LOGCALL_CTOR, matchspies, order, percent_cutoff, prepare_sub_matches(), query, Xapian::Database::Internal::readahead_for_query(), REL_VAL, Xapian::Weight::Internal::set_bounds_from_db(), Xapian::Weight::Internal::set_query(), RemoteDatabase::set_query(), sort_by, sort_key, sort_value_forward, split_rset_by_db(), time_limit, weight, and weight_cutoff.
|
inline |
Definition at line 140 of file multimatch.h.
References Xapian::Database::has_positions().
Referenced by QueryOptimiser::full_db_has_positions().
void MultiMatch::get_mset | ( | Xapian::doccount | first, |
Xapian::doccount | maxitems, | ||
Xapian::doccount | check_at_least, | ||
Xapian::MSet & | mset, | ||
Xapian::Weight::Internal & | stats, | ||
const Xapian::MatchDecider * | mdecider, | ||
const Xapian::KeyMaker * | sorter | ||
) |
Run the match and generate an MSet object.
sorter | Xapian::KeyMaker functor (or NULL for no KeyMaker) |
Comparison functor for sorting MSet
Definition at line 384 of file multimatch.cc.
References Assert, AssertRel, collapse_key, Xapian::Internal::MSetItem::collapse_key, collapse_max, db, Xapian::Enquire::DESCENDING, Collapser::empty(), Xapian::Query::empty(), Collapser::entries(), Collapser::get_collapse_count(), Xapian::Database::get_doccount(), Collapser::get_docs_considered(), Collapser::get_dups_ignored(), Collapser::get_matches_lower_bound(), RemoteSubMatch::get_mset(), get_msetcmp_function(), RemoteSubMatch::get_percent_factor(), Xapian::PostingIterator::Internal::get_termfreq_min(), RemoteSubMatch::get_uncollapsed_upper_bound(), getorrecalc_maxweight(), Xapian::MSet::internal, Xapian::Database::internal, is_remote, leaves, LOGCALL_VOID, LOGLINE, matchspies, next_handling_prune(), Collapser::old_item, order, percent_cutoff, Collapser::process(), query, rare, recalculate_w_max, REJECTED, REPLACED, sort_by, sort_key, Xapian::Internal::MSetItem::sort_key, sort_value_forward, RemoteSubMatch::start_match(), time_limit, weight_cutoff, and Xapian::Internal::MSetItem::wt.
|
private |
get the maxweight that the postlist pl may return, calling recalc_maxweight if recalculate_w_max is set, and unsetting it.
Must only be called on the top of the postlist tree.
Definition at line 358 of file multimatch.cc.
References Xapian::PostingIterator::Internal::get_description(), Xapian::PostingIterator::Internal::get_maxweight(), LOGCALL, LOGLINE, Xapian::PostingIterator::Internal::recalc_maxweight(), recalculate_w_max, and RETURN.
Referenced by get_mset().
|
private |
Assignment is not permitted.
|
inline |
Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is smaller.
Definition at line 136 of file multimatch.h.
Referenced by check_handling_prune(), MultiAndPostList::check_helper(), MaxPostList::erase_sublist(), MultiXorPostList::erase_sublist(), BranchPostList::handle_prune(), ExtraWeightPostList::next(), MergePostList::next(), next_handling_prune(), MultiAndPostList::next_helper(), Xapian::PostingSource::set_maxweight(), ExtraWeightPostList::skip_to(), skip_to_handling_prune(), and MultiAndPostList::skip_to_helper().
|
private |
Definition at line 46 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 44 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 40 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Is each sub-database remote?
Definition at line 71 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Vector of the items.
Definition at line 38 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
The matchspies to use.
Definition at line 74 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 52 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 48 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 42 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Internal flag to note that w_max needs to be recalculated while query is running.
Definition at line 68 of file multimatch.h.
Referenced by get_mset(), and getorrecalc_maxweight().
|
private |
Definition at line 56 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 54 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 58 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
Definition at line 60 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
|
private |
|
private |
Definition at line 50 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().