matcher/valuerangepostlist.h

Go to the documentation of this file.
00001 
00004 /* Copyright 2007,2008 Olly Betts
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
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 /* XAPIAN_INCLUDED_VALUERANGEPOSTLIST_H */

Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.