matcher/localmatch.h

Go to the documentation of this file.
00001 
00004 /* Copyright (C) 2006,2007 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_LOCALMATCH_H
00022 #define XAPIAN_INCLUDED_LOCALMATCH_H
00023 
00024 #include "database.h"
00025 #include "omqueryinternal.h"
00026 #include "rset.h"
00027 #include "submatch.h"
00028 
00029 namespace Xapian { class Weight; }
00030 
00031 #include <map>
00032 
00033 class Stats;
00034 
00035 class LocalSubMatch : public SubMatch {
00037     void operator=(const LocalSubMatch &);
00038 
00040     LocalSubMatch(const LocalSubMatch &);
00041 
00044     const Stats * stats;
00045 
00047     Xapian::Query::Internal orig_query;
00048 
00050     Xapian::termcount qlen;
00051 
00053     const Xapian::Database::Internal *db;
00054 
00059     RSetI rset;
00060 
00062     const Xapian::Weight * wt_factory;
00063 
00065     std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> * term_info;
00066 
00067   public:
00069     LocalSubMatch(const Xapian::Database::Internal *db,
00070                   const Xapian::Query::Internal * query,
00071                   Xapian::termcount qlen,
00072                   const Xapian::RSet & omrset,
00073                   const Xapian::Weight *wt_factory);
00074 
00076     bool prepare_match(bool nowait, Stats & total_stats);
00077 
00079     void start_match(Xapian::doccount first,
00080                      Xapian::doccount maxitems,
00081                      Xapian::doccount check_at_least,
00082                      const Stats & total_stats);
00083 
00085     PostList * get_postlist_and_term_info(MultiMatch *matcher,
00086         std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> *termfreqandwts);
00087 
00092     PostList * postlist_from_op_leaf_query(const Xapian::Query::Internal *query,
00093                                            double factor);
00094 };
00095 
00096 #endif /* XAPIAN_INCLUDED_LOCALMATCH_H */

Documentation for Xapian (version 1.0.20).
Generated on 28 Apr 2010 by Doxygen 1.5.2.