1 /** @file multi_termlist.h
2 * @brief C++ class declaration for multiple database access
4 /* Copyright 1999,2000,2001 BrightStation PLC
5 * Copyright 2002,2003,2004,2005,2006,2007,2010,2011 Olly Betts
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 #ifndef OM_HGUARD_MULTI_TERMLIST_H
24 #define OM_HGUARD_MULTI_TERMLIST_H
26 #include "api/termlist.h"
27 #include "backends/database.h"
29 class MultiTermList
: public TermList
{
30 friend class Xapian::Database
;
33 const Xapian::Database
& db
;
35 double termfreq_factor
;
37 MultiTermList(TermList
* tl_
,
38 const Xapian::Database
&db_
,
41 Xapian::termcount
get_approx_size() const;
43 /// Collate weighting information for the current term.
44 void accumulate_stats(Xapian::Internal::ExpandStats
& stats
) const;
46 string
get_termname() const;
47 Xapian::termcount
get_wdf() const; // Number of occurrences of term in current doc
48 Xapian::doccount
get_termfreq() const; // Number of docs indexed by term
50 TermList
* skip_to(const std::string
& term
);
53 Xapian::termcount
positionlist_count() const;
55 Xapian::PositionIterator
positionlist_begin() const;
60 #endif /* OM_HGUARD_MULTI_TERMLIST_H */