#include <localmatch.h>
Inheritance diagram for LocalSubMatch:
Public Member Functions | |
LocalSubMatch (const Xapian::Database::Internal *db, const Xapian::Query::Internal *query, Xapian::termcount qlen, const Xapian::RSet &omrset, const Xapian::Weight *wt_factory) | |
Constructor. | |
bool | prepare_match (bool nowait, Stats &total_stats) |
Fetch and collate statistics. | |
void | start_match (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, const Stats &total_stats) |
Start the match. | |
PostList * | get_postlist_and_term_info (MultiMatch *matcher, std::map< string, Xapian::MSet::Internal::TermFreqAndWeight > *termfreqandwts) |
Get PostList and term info. | |
PostList * | postlist_from_op_leaf_query (const Xapian::Query::Internal *query, double factor) |
Convert an OP_LEAF query to a PostList. | |
Private Member Functions | |
void | operator= (const LocalSubMatch &) |
Don't allow assignment. | |
LocalSubMatch (const LocalSubMatch &) | |
Don't allow copying. | |
Private Attributes | |
const Stats * | stats |
The statistics for the collection. | |
Xapian::Query::Internal | orig_query |
The original query before any rearrangement. | |
Xapian::termcount | qlen |
The query length (used by some weighting schemes). | |
const Xapian::Database::Internal * | db |
The (sub-)Database we're searching. | |
RSetI | rset |
The (sub-)RSet (used to calculate R and r). | |
const Xapian::Weight * | wt_factory |
Weight object (used as a factory by calling create on it). | |
std::map< string, Xapian::MSet::Internal::TermFreqAndWeight > | term_info |
The termfreqs and weights of terms used in orig_query. |
Definition at line 36 of file localmatch.h.
LocalSubMatch::LocalSubMatch | ( | const LocalSubMatch & | ) | [private] |
Don't allow copying.
LocalSubMatch::LocalSubMatch | ( | const Xapian::Database::Internal * | db, | |
const Xapian::Query::Internal * | query, | |||
Xapian::termcount | qlen, | |||
const Xapian::RSet & | omrset, | |||
const Xapian::Weight * | wt_factory | |||
) |
void LocalSubMatch::operator= | ( | const LocalSubMatch & | ) | [private] |
Don't allow assignment.
bool LocalSubMatch::prepare_match | ( | bool | nowait, | |
Stats & | total_stats | |||
) | [virtual] |
Fetch and collate statistics.
Implements SubMatch.
Definition at line 55 of file localmatch.cc.
References Stats::average_length, Stats::collection_size, RSetI::contribute_stats(), db, DEBUGCALL, Xapian::Database::Internal::get_avlength(), Xapian::Database::Internal::get_doccount(), Xapian::Database::Internal::get_termfreq(), Xapian::Query::Internal::get_terms(), orig_query, RETURN, rset, Stats::set_termfreq(), and RSetI::will_want_reltermfreq().
void LocalSubMatch::start_match | ( | Xapian::doccount | first, | |
Xapian::doccount | maxitems, | |||
Xapian::doccount | check_at_least, | |||
const Stats & | total_stats | |||
) | [virtual] |
Start the match.
Implements SubMatch.
Definition at line 83 of file localmatch.cc.
References stats.
PostList* LocalSubMatch::get_postlist_and_term_info | ( | MultiMatch * | matcher, | |
std::map< string, Xapian::MSet::Internal::TermFreqAndWeight > * | termfreqandwts | |||
) |
Get PostList and term info.
PostList * LocalSubMatch::postlist_from_op_leaf_query | ( | const Xapian::Query::Internal * | query, | |
double | factor | |||
) |
Convert an OP_LEAF query to a PostList.
This is called by QueryOptimiser when it reaches an OP_LEAF query.
Definition at line 117 of file localmatch.cc.
References Assert, AssertEq, Xapian::Weight::create(), Stats::create_weight_internal(), db, DEBUGCALL, Xapian::Query::empty(), Stats::get_termfreq(), Xapian::Query::Internal::OP_LEAF, Xapian::Database::Internal::open_post_list(), qlen, query(), AutoPtr< _Tp >::release(), RETURN, LeafPostList::set_termweight(), stats, term_info, and wt_factory.
Referenced by QueryOptimiser::do_leaf().
const Stats* LocalSubMatch::stats [private] |
The statistics for the collection.
Definition at line 45 of file localmatch.h.
Referenced by postlist_from_op_leaf_query(), and start_match().
The original query before any rearrangement.
Definition at line 48 of file localmatch.h.
Referenced by prepare_match().
Xapian::termcount LocalSubMatch::qlen [private] |
The query length (used by some weighting schemes).
Definition at line 51 of file localmatch.h.
Referenced by postlist_from_op_leaf_query().
const Xapian::Database::Internal* LocalSubMatch::db [private] |
The (sub-)Database we're searching.
Definition at line 54 of file localmatch.h.
Referenced by LocalSubMatch(), postlist_from_op_leaf_query(), and prepare_match().
RSetI LocalSubMatch::rset [private] |
The (sub-)RSet (used to calculate R and r).
R and r are used in probabilistic weighting formulae.
Definition at line 60 of file localmatch.h.
Referenced by prepare_match().
const Xapian::Weight* LocalSubMatch::wt_factory [private] |
Weight object (used as a factory by calling create on it).
Definition at line 63 of file localmatch.h.
Referenced by postlist_from_op_leaf_query().
std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> LocalSubMatch::term_info [private] |
The termfreqs and weights of terms used in orig_query.
Definition at line 66 of file localmatch.h.
Referenced by postlist_from_op_leaf_query().