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