#include <localsubmatch.h>


Public Member Functions | |
| LocalSubMatch (const Xapian::Database::Internal *db_, const Xapian::Query::Internal *query_, Xapian::termcount qlen_, const Xapian::RSet &rset_, const Xapian::Weight *wt_factory_) | |
| Constructor. | |
| bool | prepare_match (bool nowait, Xapian::Weight::Internal &total_stats) |
| Fetch and collate statistics. | |
| void | start_match (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, const Xapian::Weight::Internal &total_stats) |
| Start the match. | |
| PostList * | get_postlist_and_term_info (MultiMatch *matcher, std::map< std::string, Xapian::MSet::Internal::TermFreqAndWeight > *termfreqandwts, Xapian::termcount *total_subqs_ptr) |
| Get PostList and term info. | |
| PostList * | make_synonym_postlist (PostList *or_pl, MultiMatch *matcher, double factor) |
| Convert a postlist into a synonym postlist. | |
| 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 Xapian::Weight::Internal * | stats |
| The statistics for the collection. | |
| const Xapian::Query::Internal * | 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. | |
| Xapian::RSet | rset |
| The 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< std::string, Xapian::MSet::Internal::TermFreqAndWeight > * | term_info |
| The termfreqs and weights of terms used in orig_query, or NULL. | |
Definition at line 34 of file localsubmatch.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 & | rset_, | |||
| const Xapian::Weight * | wt_factory_ | |||
| ) | [inline] |
| PostList * LocalSubMatch::get_postlist_and_term_info | ( | MultiMatch * | matcher, | |
| std::map< std::string, Xapian::MSet::Internal::TermFreqAndWeight > * | termfreqandwts, | |||
| Xapian::termcount * | total_subqs_ptr | |||
| ) | [virtual] |
Get PostList and term info.
Implements SubMatch.
Definition at line 70 of file localsubmatch.cc.
References Xapian::Weight::clone(), db, QueryOptimiser::get_total_subqueries(), LOGCALL, QueryOptimiser::optimise_query(), qlen, query, RETURN, stats, term_info, and wt_factory.
| PostList * LocalSubMatch::make_synonym_postlist | ( | PostList * | or_pl, | |
| MultiMatch * | matcher, | |||
| double | factor | |||
| ) |
Convert a postlist into a synonym postlist.
Definition at line 98 of file localsubmatch.cc.
References Xapian::Weight::clone(), Xapian::Weight::Internal::collection_size, Xapian::PostingIterator::Internal::get_termfreq_est(), Xapian::PostingIterator::Internal::get_termfreq_est_using_stats(), LOGCALL, LOGVALUE, qlen, RETURN, stats, usual, and wt_factory.
Referenced by QueryOptimiser::do_synonym().
| void LocalSubMatch::operator= | ( | const LocalSubMatch & | ) | [private] |
Don't allow assignment.
| 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 122 of file localsubmatch.cc.
References Assert, AssertEq, Xapian::Weight::clone(), db, Xapian::Weight::Internal::get_termfreq(), Xapian::Query::Internal::get_wqf(), LOGCALL, Xapian::Query::Internal::op, Xapian::Query::Internal::OP_LEAF, Xapian::Database::Internal::open_post_list(), qlen, RETURN, LeafPostList::set_termweight(), stats, Xapian::Query::Internal::subqs, term_info, Xapian::Query::Internal::tname, and wt_factory.
Referenced by QueryOptimiser::do_subquery().
| bool LocalSubMatch::prepare_match | ( | bool | nowait, | |
| Xapian::Weight::Internal & | total_stats | |||
| ) | [virtual] |
Fetch and collate statistics.
Implements SubMatch.
Definition at line 44 of file localsubmatch.cc.
References Xapian::Weight::Internal::accumulate_stats(), Assert, db, LOGCALL, query, RETURN, and rset.
| void LocalSubMatch::start_match | ( | Xapian::doccount | first, | |
| Xapian::doccount | maxitems, | |||
| Xapian::doccount | check_at_least, | |||
| const Xapian::Weight::Internal & | total_stats | |||
| ) | [virtual] |
Start the match.
Implements SubMatch.
Definition at line 56 of file localsubmatch.cc.
References LOGCALL_VOID, and stats.
const Xapian::Database::Internal* LocalSubMatch::db [private] |
The (sub-)Database we're searching.
Definition at line 51 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), postlist_from_op_leaf_query(), and prepare_match().
Xapian::termcount LocalSubMatch::qlen [private] |
The query length (used by some weighting schemes).
Definition at line 48 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), make_synonym_postlist(), and postlist_from_op_leaf_query().
const Xapian::Query::Internal* LocalSubMatch::query [private] |
The original query before any rearrangement.
Definition at line 45 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), and prepare_match().
Xapian::RSet LocalSubMatch::rset [private] |
The RSet (used to calculate R and r).
R and r are used in probabilistic weighting formulae.
Definition at line 57 of file localsubmatch.h.
Referenced by prepare_match().
const Xapian::Weight::Internal* LocalSubMatch::stats [private] |
The statistics for the collection.
Definition at line 42 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), make_synonym_postlist(), postlist_from_op_leaf_query(), and start_match().
std::map<std::string, Xapian::MSet::Internal::TermFreqAndWeight>* LocalSubMatch::term_info [private] |
The termfreqs and weights of terms used in orig_query, or NULL.
Definition at line 64 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), and postlist_from_op_leaf_query().
const Xapian::Weight* LocalSubMatch::wt_factory [private] |
Weight object (used as a factory by calling create on it).
Definition at line 60 of file localsubmatch.h.
Referenced by get_postlist_and_term_info(), make_synonym_postlist(), and postlist_from_op_leaf_query().