MultiMatch Class Reference

#include <multimatch.h>

Collaboration diagram for MultiMatch:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MultiMatch (const Xapian::Database &db_, const Xapian::Query::Internal *query, Xapian::termcount qlen, const Xapian::RSet *omrset, 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_, const Xapian::Sorter *sorter_, Xapian::ErrorHandler *errorhandler, Stats &stats, const Xapian::Weight *wtscheme)
 MultiMatch constructor.
void get_mset (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, Xapian::MSet &mset, const Stats &stats, const Xapian::MatchDecider *mdecider, const Xapian::MatchDecider *matchspy)
void recalc_maxweight ()
 Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is smaller.

Private Member Functions

string get_collapse_key (PostList *pl, Xapian::docid did, Xapian::valueno keyno, Xapian::Internal::RefCntPtr< Xapian::Document::Internal > &doc)
 get the collapse key
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::Internalquery
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
const Xapian::Sortersorter
Xapian::ErrorHandlererrorhandler
 ErrorHandler.
const Xapian::Weightweight
 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?

Detailed Description

Definition at line 34 of file multimatch.h.


Constructor & Destructor Documentation

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::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_,
const Xapian::Sorter sorter_,
Xapian::ErrorHandler errorhandler,
Stats stats,
const Xapian::Weight wtscheme 
)

MultiMatch constructor.

Parameters:
db_ The database to use.
query The query
qlen The query length
omrset The relevance set (or NULL for no RSet)
errorhandler Errorhandler object
sorter Xapian::Sorter functor (or NULL for no Sorter).
stats The stats object to add our stats to.
wtscheme Weighting scheme

Definition at line 178 of file multimatch.cc.

References Assert, collapse_key, db, DEBUGCALL, DEBUGLINE, errorhandler, Xapian::Database::internal, is_remote, leaves, order, percent_cutoff, prepare_sub_matches(), query, REL, REL_VAL, RemoteDatabase::set_query(), sort_by, sort_key, sort_value_forward, split_rset_by_db(), Xapian::Query::Internal::validate_query(), weight, and weight_cutoff.


Member Function Documentation

string MultiMatch::get_collapse_key ( PostList pl,
Xapian::docid  did,
Xapian::valueno  keyno,
Xapian::Internal::RefCntPtr< Xapian::Document::Internal > &  doc 
) [private]

get the collapse key

Definition at line 252 of file multimatch.cc.

References Assert, db, DEBUGCALL, Xapian::Internal::RefCntPtr< T >::get(), Xapian::PostingIterator::Internal::get_collapse_key(), Xapian::Database::internal, and RETURN.

Referenced by get_mset().

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 270 of file multimatch.cc.

References AssertEqDoubleParanoid, DEBUGCALL, DEBUGLINE, Xapian::PostingIterator::Internal::get_maxweight(), 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::get_mset ( Xapian::doccount  first,
Xapian::doccount  maxitems,
Xapian::doccount  check_at_least,
Xapian::MSet mset,
const Stats stats,
const Xapian::MatchDecider mdecider,
const Xapian::MatchDecider matchspy 
)

Comparison functor for sorting MSet

Definition at line 287 of file multimatch.cc.

References Assert, Xapian::BAD_VALUENO, Xapian::Internal::MSetItem::collapse_count, Xapian::Internal::MSetItem::collapse_key, collapse_key, db, DEBUGCALL, DEBUGLINE, Xapian::Enquire::DESCENDING, Xapian::Internal::MSetItem::did, errorhandler, Xapian::Internal::RefCntPtr< T >::get(), get_collapse_key(), get_msetcmp_function(), RemoteSubMatch::get_percent_factor(), getorrecalc_maxweight(), if(), Xapian::Database::internal, is_remote, leaves, next_handling_prune(), order, percent_cutoff, query, rare, recalculate_w_max, REL, REL_VAL, sort_by, sort_key, Xapian::Internal::MSetItem::sort_key, sort_value_forward, sorter, Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), VAL, w(), weight_cutoff, and Xapian::Internal::MSetItem::wt.

void MultiMatch::recalc_maxweight (  ) 

Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is smaller.

Definition at line 1077 of file multimatch.cc.

References DEBUGCALL, and recalculate_w_max.

Referenced by MultiAndPostList::check_helper(), BranchPostList::handle_prune(), ExtraWeightPostList::next(), next_handling_prune(), MultiAndPostList::next_helper(), ExtraWeightPostList::skip_to(), skip_to_handling_prune(), and MultiAndPostList::skip_to_helper().


Member Data Documentation

std::vector<Xapian::Internal::RefCntPtr<SubMatch> > MultiMatch::leaves [private]

Vector of the items.

Definition at line 38 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

const Xapian::Database MultiMatch::db [private]

Definition at line 40 of file multimatch.h.

Referenced by get_collapse_key(), get_mset(), and MultiMatch().

const Xapian::Query::Internal* MultiMatch::query [private]

Definition at line 42 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

Xapian::valueno MultiMatch::collapse_key [private]

Definition at line 44 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

int MultiMatch::percent_cutoff [private]

Definition at line 46 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

Xapian::weight MultiMatch::weight_cutoff [private]

Definition at line 48 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

Xapian::Enquire::docid_order MultiMatch::order [private]

Definition at line 50 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

Xapian::valueno MultiMatch::sort_key [private]

Definition at line 52 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

Xapian::Enquire::Internal::sort_setting MultiMatch::sort_by [private]

Definition at line 54 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

bool MultiMatch::sort_value_forward [private]

Definition at line 56 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

const Xapian::Sorter* MultiMatch::sorter [private]

Definition at line 58 of file multimatch.h.

Referenced by get_mset().

Xapian::ErrorHandler* MultiMatch::errorhandler [private]

ErrorHandler.

Definition at line 61 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().

const Xapian::Weight* MultiMatch::weight [private]

Weighting scheme.

Definition at line 64 of file multimatch.h.

Referenced by MultiMatch().

bool MultiMatch::recalculate_w_max [private]

Internal flag to note that w_max needs to be recalculated while query is running.

Definition at line 69 of file multimatch.h.

Referenced by get_mset(), getorrecalc_maxweight(), and recalc_maxweight().

vector<bool> MultiMatch::is_remote [private]

Is each sub-database remote?

Definition at line 72 of file multimatch.h.

Referenced by get_mset(), and MultiMatch().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.