00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef XAPIAN_INCLUDED_REMOTESUBMATCH_H
00023 #define XAPIAN_INCLUDED_REMOTESUBMATCH_H
00024
00025 #include "submatch.h"
00026 #include "remote-database.h"
00027 #include "xapian/weight.h"
00028
00029 namespace Xapian {
00030 class MatchSpy;
00031 }
00032
00034 class RemoteSubMatch : public SubMatch {
00036 void operator=(const RemoteSubMatch &);
00037
00039 RemoteSubMatch(const RemoteSubMatch &);
00040
00042 RemoteDatabase *db;
00043
00048 bool decreasing_relevance;
00049
00051 double percent_factor;
00052
00054 const vector<Xapian::MatchSpy *> & matchspies;
00055
00056 public:
00058 RemoteSubMatch(RemoteDatabase *db_,
00059 bool decreasing_relevance_,
00060 const vector<Xapian::MatchSpy *> & matchspies);
00061
00063 bool prepare_match(bool nowait, Xapian::Weight::Internal & total_stats);
00064
00066 void start_match(Xapian::doccount first,
00067 Xapian::doccount maxitems,
00068 Xapian::doccount check_at_least,
00069 const Xapian::Weight::Internal & total_stats);
00070
00072 PostList * get_postlist_and_term_info(MultiMatch *matcher,
00073 std::map<std::string,
00074 Xapian::MSet::Internal::TermFreqAndWeight> *termfreqandwts,
00075 Xapian::termcount * total_subqs_ptr);
00076
00078 double get_percent_factor() const { return percent_factor; }
00079
00081 void get_mset(Xapian::MSet & mset) { db->get_mset(mset, matchspies); }
00082 };
00083
00084 #endif