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 #include <vector>
00033 
00034 class Stats;
00035 
00036 class LocalSubMatch : public SubMatch {
00038     void operator=(const LocalSubMatch &);
00039 
00041     LocalSubMatch(const LocalSubMatch &);
00042 
00045     const Stats * stats;
00046 
00048     Xapian::Query::Internal orig_query;
00049 
00051     Xapian::termcount qlen;
00052 
00054     const Xapian::Database::Internal *db;
00055 
00060     RSetI rset;
00061 
00063     const Xapian::Weight * wt_factory;
00064 
00066     std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> term_info;
00067 
00068   public:
00070     LocalSubMatch(const Xapian::Database::Internal *db,
00071                   const Xapian::Query::Internal * query,
00072                   Xapian::termcount qlen,
00073                   const Xapian::RSet & omrset,
00074                   const Xapian::Weight *wt_factory);
00075 
00077     bool prepare_match(bool nowait, Stats & total_stats);
00078 
00080     void start_match(Xapian::doccount first,
00081                      Xapian::doccount maxitems,
00082                      Xapian::doccount check_at_least,
00083                      const Stats & total_stats);
00084 
00086     PostList * get_postlist_and_term_info(MultiMatch *matcher,
00087         std::map<string, Xapian::MSet::Internal::TermFreqAndWeight> *termfreqandwts);
00088 
00093     PostList * postlist_from_op_leaf_query(const Xapian::Query::Internal *query,
00094                                            double factor);
00095 };
00096 
00097 #endif /* XAPIAN_INCLUDED_LOCALMATCH_H */

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