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 #include <vector>
00033
00034 class Stats;
00035
00036 class LocalSubMatch : public SubMatch {
00038 void operator=(const LocalSubMatch &);
00039
00041 LocalSubMatch(const LocalSubMatch &);
00042
00045 const Stats * stats;
00046
00048 Xapian::Query::Internal orig_query;
00049
00051 Xapian::termcount qlen;
00052
00054 const Xapian::Database::Internal *db;
00055
00060 RSetI rset;
00061
00063 const Xapian::Weight * wt_factory;
00064
00066 std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> term_info;
00067
00068 public:
00070 LocalSubMatch(const Xapian::Database::Internal *db,
00071 const Xapian::Query::Internal * query,
00072 Xapian::termcount qlen,
00073 const Xapian::RSet & omrset,
00074 const Xapian::Weight *wt_factory);
00075
00077 bool prepare_match(bool nowait, Stats & total_stats);
00078
00080 void start_match(Xapian::doccount first,
00081 Xapian::doccount maxitems,
00082 Xapian::doccount check_at_least,
00083 const Stats & total_stats);
00084
00086 PostList * get_postlist_and_term_info(MultiMatch *matcher,
00087 std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> *termfreqandwts);
00088
00093 PostList * postlist_from_op_leaf_query(const Xapian::Query::Internal *query,
00094 double factor);
00095 };
00096
00097 #endif