matcher/mergepostlist.h

Go to the documentation of this file.
00001 /* mergepostlist.h: merge postlists from different databases
00002  *
00003  * Copyright 1999,2000,2001 BrightStation PLC
00004  * Copyright 2002 Ananova Ltd
00005  * Copyright 2002,2003,2004,2005 Olly Betts
00006  * Copyright 2007 Lemur Consulting Ltd
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of the
00011  * License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00021  * USA
00022  */
00023 
00024 #ifndef OM_HGUARD_MERGEPOSTLIST_H
00025 #define OM_HGUARD_MERGEPOSTLIST_H
00026 
00027 #include "postlist.h"
00028 
00031 class MergePostList : public PostList {
00032     private:
00033         // Prevent copying
00034         MergePostList(const MergePostList &);
00035         MergePostList & operator=(const MergePostList &);
00036 
00037         Xapian::weight w_max;
00038 
00039         vector<PostList *> plists;
00040 
00041         int current;
00042 
00048         MultiMatch *matcher;
00049 
00050         Xapian::ErrorHandler * errorhandler;
00051     public:
00052         Xapian::termcount get_wdf() const;
00053         Xapian::doccount get_termfreq_max() const;
00054         Xapian::doccount get_termfreq_min() const;
00055         Xapian::doccount get_termfreq_est() const;
00056 
00057         Xapian::docid  get_docid() const;
00058         Xapian::weight get_weight() const;
00059         const string * get_collapse_key() const;
00060 
00061         Xapian::weight get_maxweight() const;
00062 
00063         Xapian::weight recalc_maxweight();
00064 
00065         PostList *next(Xapian::weight w_min);
00066         PostList *skip_to(Xapian::docid did, Xapian::weight w_min);
00067         bool   at_end() const;
00068 
00069         string get_description() const;
00070 
00074         virtual Xapian::doclength get_doclength() const;
00075 
00076         MergePostList(vector<PostList *> plists_,
00077                       MultiMatch *matcher,
00078                       Xapian::ErrorHandler * errorhandler_);
00079         ~MergePostList();
00080 };
00081 
00082 #endif /* OM_HGUARD_MERGEPOSTLIST_H */

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