00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef XAPIAN_INCLUDED_VALUERANGEPOSTLIST_H
00024 #define XAPIAN_INCLUDED_VALUERANGEPOSTLIST_H
00025
00026 #include "database.h"
00027 #include "postlist.h"
00028 #include "valuelist.h"
00029
00030 class ValueRangePostList : public PostList {
00031 protected:
00032 const Xapian::Database::Internal *db;
00033
00034 Xapian::valueno slot;
00035
00036 const std::string begin, end;
00037
00038 Xapian::doccount db_size;
00039
00040 ValueList * valuelist;
00041
00043 ValueRangePostList(const ValueRangePostList &);
00044
00046 void operator=(const ValueRangePostList &);
00047
00048 public:
00049 ValueRangePostList(const Xapian::Database::Internal *db_,
00050 Xapian::valueno slot_,
00051 const std::string &begin_, const std::string &end_)
00052 : db(db_), slot(slot_), begin(begin_), end(end_),
00053 db_size(db->get_doccount()), valuelist(0) { }
00054
00055 ~ValueRangePostList();
00056
00057 Xapian::doccount get_termfreq_min() const;
00058
00059 Xapian::doccount get_termfreq_est() const;
00060
00061 Xapian::doccount get_termfreq_max() const;
00062
00063 TermFreqs get_termfreq_est_using_stats(
00064 const Xapian::Weight::Internal & stats) const;
00065
00066 Xapian::weight get_maxweight() const;
00067
00068 Xapian::docid get_docid() const;
00069
00070 Xapian::weight get_weight() const;
00071
00072 Xapian::termcount get_doclength() const;
00073
00074 Xapian::weight recalc_maxweight();
00075
00076 PositionList * read_position_list();
00077
00078 PositionList * open_position_list() const;
00079
00080 PostList * next(Xapian::weight w_min);
00081
00082 PostList * skip_to(Xapian::docid, Xapian::weight w_min);
00083
00084 PostList * check(Xapian::docid did, Xapian::weight w_min, bool &valid);
00085
00086 bool at_end() const;
00087
00088 Xapian::termcount count_matching_subqs() const;
00089
00090 string get_description() const;
00091 };
00092
00093 #endif