00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef XAPIAN_INCLUDED_LOCALMATCH_H
00022 #define XAPIAN_INCLUDED_LOCALMATCH_H
00023
00024 #include "database.h"
00025 #include "omqueryinternal.h"
00026 #include "rset.h"
00027 #include "submatch.h"
00028
00029 namespace Xapian { class Weight; }
00030
00031 #include <map>
00032
00033 class Stats;
00034
00035 class LocalSubMatch : public SubMatch {
00037 void operator=(const LocalSubMatch &);
00038
00040 LocalSubMatch(const LocalSubMatch &);
00041
00044 const Stats * stats;
00045
00047 Xapian::Query::Internal orig_query;
00048
00050 Xapian::termcount qlen;
00051
00053 const Xapian::Database::Internal *db;
00054
00059 RSetI rset;
00060
00062 const Xapian::Weight * wt_factory;
00063
00065 std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> * term_info;
00066
00067 public:
00069 LocalSubMatch(const Xapian::Database::Internal *db,
00070 const Xapian::Query::Internal * query,
00071 Xapian::termcount qlen,
00072 const Xapian::RSet & omrset,
00073 const Xapian::Weight *wt_factory);
00074
00076 bool prepare_match(bool nowait, Stats & total_stats);
00077
00079 void start_match(Xapian::doccount first,
00080 Xapian::doccount maxitems,
00081 Xapian::doccount check_at_least,
00082 const Stats & total_stats);
00083
00085 PostList * get_postlist_and_term_info(MultiMatch *matcher,
00086 std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> *termfreqandwts);
00087
00092 PostList * postlist_from_op_leaf_query(const Xapian::Query::Internal *query,
00093 double factor);
00094 };
00095
00096 #endif