#include <multimatch.h>

Public Member Functions | |
| MultiMatch (const Xapian::Database &db_, const Xapian::Query::Internal *query, Xapian::termcount qlen, const Xapian::RSet *omrset, Xapian::doccount collapse_max_, Xapian::valueno collapse_key_, int percent_cutoff_, Xapian::weight weight_cutoff_, Xapian::Enquire::docid_order order_, Xapian::valueno sort_key_, Xapian::Enquire::Internal::sort_setting sort_by_, bool sort_value_forward_, Xapian::ErrorHandler *errorhandler, Xapian::Weight::Internal &stats, const Xapian::Weight *wtscheme, const vector< Xapian::MatchSpy * > &matchspies_, bool have_sorter, bool have_mdecider) | |
| MultiMatch constructor. | |
| void | get_mset (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, Xapian::MSet &mset, const Xapian::Weight::Internal &stats, const Xapian::MatchDecider *mdecider, const Xapian::MatchDecider *matchspy_legacy, const Xapian::KeyMaker *sorter) |
| Run the match and generate an MSet object. | |
| void | recalc_maxweight () |
| Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is smaller. | |
Private Member Functions | |
| Xapian::weight | 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. | |
| MultiMatch (const MultiMatch &) | |
| Copying is not permitted. | |
| void | operator= (const MultiMatch &) |
| Assignment is not permitted. | |
Private Attributes | |
| std::vector < Xapian::Internal::RefCntPtr < SubMatch > > | leaves |
| Vector of the items. | |
| const Xapian::Database | db |
| const Xapian::Query::Internal * | query |
| Xapian::doccount | collapse_max |
| Xapian::valueno | collapse_key |
| int | percent_cutoff |
| Xapian::weight | weight_cutoff |
| Xapian::Enquire::docid_order | order |
| Xapian::valueno | sort_key |
| Xapian::Enquire::Internal::sort_setting | sort_by |
| bool | sort_value_forward |
| Xapian::ErrorHandler * | errorhandler |
| ErrorHandler. | |
| const Xapian::Weight * | weight |
| Weighting scheme. | |
| bool | recalculate_w_max |
| Internal flag to note that w_max needs to be recalculated while query is running. | |
| vector< bool > | is_remote |
| Is each sub-database remote? | |
| const vector< Xapian::MatchSpy * > & | matchspies |
| The matchspies to use. | |
Definition at line 33 of file multimatch.h.
| MultiMatch::MultiMatch | ( | const MultiMatch & | ) | [private] |
Copying is not permitted.
| MultiMatch::MultiMatch | ( | const Xapian::Database & | db_, | |
| const Xapian::Query::Internal * | query, | |||
| Xapian::termcount | qlen, | |||
| const Xapian::RSet * | omrset, | |||
| Xapian::doccount | collapse_max_, | |||
| Xapian::valueno | collapse_key_, | |||
| int | percent_cutoff_, | |||
| Xapian::weight | weight_cutoff_, | |||
| Xapian::Enquire::docid_order | order_, | |||
| Xapian::valueno | sort_key_, | |||
| Xapian::Enquire::Internal::sort_setting | sort_by_, | |||
| bool | sort_value_forward_, | |||
| Xapian::ErrorHandler * | errorhandler, | |||
| Xapian::Weight::Internal & | stats, | |||
| const Xapian::Weight * | wtscheme, | |||
| const vector< 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) | |
| errorhandler | Errorhandler object | |
| 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 203 of file multimatch.cc.
References Xapian::Database::Internal::as_remotedatabase(), Assert, collapse_key, collapse_max, db, errorhandler, Xapian::Database::internal, is_remote, leaves, LOGCALL_CTOR, LOGLINE, Xapian::Weight::Internal::mark_wanted_terms(), matchspies, order, percent_cutoff, prepare_sub_matches(), query, REL, REL_VAL, Xapian::Weight::Internal::set_bounds_from_db(), RemoteDatabase::set_query(), sort_by, sort_key, sort_value_forward, split_rset_by_db(), Xapian::Query::Internal::validate_query(), weight, and weight_cutoff.
| void MultiMatch::get_mset | ( | Xapian::doccount | first, | |
| Xapian::doccount | maxitems, | |||
| Xapian::doccount | check_at_least, | |||
| Xapian::MSet & | mset, | |||
| const Xapian::Weight::Internal & | stats, | |||
| const Xapian::MatchDecider * | mdecider, | |||
| const Xapian::MatchDecider * | matchspy_legacy, | |||
| 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 304 of file multimatch.cc.
References Assert, AssertRel, Xapian::Internal::MSetItem::collapse_key, collapse_key, collapse_max, db, Xapian::Enquire::DESCENDING, Collapser::empty(), Collapser::entries(), errorhandler, Collapser::get_collapse_count(), 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(), getorrecalc_maxweight(), Xapian::Database::internal, Xapian::MSet::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, REL, REL_VAL, REPLACED, sort_by, sort_key, Xapian::Internal::MSetItem::sort_key, sort_value_forward, RemoteSubMatch::start_match(), VAL, weight_cutoff, and Xapian::Internal::MSetItem::wt.
| Xapian::weight MultiMatch::getorrecalc_maxweight | ( | PostList * | pl | ) | [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 286 of file multimatch.cc.
References AssertEqDoubleParanoid, 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().
| void MultiMatch::operator= | ( | const MultiMatch & | ) | [private] |
Assignment is not permitted.
| void MultiMatch::recalc_maxweight | ( | ) | [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.
References recalculate_w_max.
Referenced by check_handling_prune(), MultiAndPostList::check_helper(), MultiXorPostList::erase_sublist(), BranchPostList::handle_prune(), MultiXorPostList::next(), MergePostList::next(), ExtraWeightPostList::next(), next_handling_prune(), MultiAndPostList::next_helper(), Xapian::PostingSource::set_maxweight(), MultiXorPostList::skip_to(), ExtraWeightPostList::skip_to(), skip_to_handling_prune(), and MultiAndPostList::skip_to_helper().
Xapian::valueno MultiMatch::collapse_key [private] |
Xapian::doccount MultiMatch::collapse_max [private] |
const Xapian::Database MultiMatch::db [private] |
Xapian::ErrorHandler* MultiMatch::errorhandler [private] |
ErrorHandler.
Definition at line 60 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
vector<bool> MultiMatch::is_remote [private] |
Is each sub-database remote?
Definition at line 71 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
std::vector<Xapian::Internal::RefCntPtr<SubMatch> > MultiMatch::leaves [private] |
Vector of the items.
Definition at line 37 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
const vector<Xapian::MatchSpy *>& MultiMatch::matchspies [private] |
The matchspies to use.
Definition at line 74 of file multimatch.h.
Referenced by get_mset(), and MultiMatch().
int MultiMatch::percent_cutoff [private] |
const Xapian::Query::Internal* MultiMatch::query [private] |
bool MultiMatch::recalculate_w_max [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(), getorrecalc_maxweight(), and recalc_maxweight().
Xapian::valueno MultiMatch::sort_key [private] |
bool MultiMatch::sort_value_forward [private] |
const Xapian::Weight* MultiMatch::weight [private] |
Xapian::weight MultiMatch::weight_cutoff [private] |