xapian-core  1.4.25
emptypostlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2009,2011,2015 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_EMPTYPOSTLIST_H
22 #define XAPIAN_INCLUDED_EMPTYPOSTLIST_H
23 
24 #include "postlist.h"
25 
27 class EmptyPostList : public PostList {
29  void operator=(const EmptyPostList &);
30 
33 
34  public:
37 
41 
43 
44  double get_maxweight() const;
45  Xapian::docid get_docid() const;
48  double get_weight() const;
49  bool at_end() const;
50  double recalc_maxweight();
51 
52  PostList * next(double w_min);
53  PostList * skip_to(Xapian::docid, double w_min);
54 
55  std::string get_description() const;
56 };
57 
58 #endif // XAPIAN_INCLUDED_EMPTYPOSTLIST_H
Abstract base class for postlists.
Definition: postlist.h:37
Xapian::docid get_docid() const
Return the current docid.
A PostList which contains no entries.
Definition: emptypostlist.h:27
EmptyPostList()
Constructor.
Definition: emptypostlist.h:36
Abstract base class for postlists.
double get_maxweight() const
Return an upper bound on what get_weight() can return.
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
std::string get_description() const
Return a string description of this object.
Class to hold statistics for a given collection.
Internal * next()
Advance the current position to the next document in the postlist.
Definition: postlist.h:194
Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
The frequencies for a term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
void operator=(const EmptyPostList &)
Don't allow assignment.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
double get_weight() const
Return the weight contribution for the current position.
Xapian::termcount get_doclength() const
Return the length of current document.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &) const
Get an estimate for the termfreq and reltermfreq, given the stats.
bool at_end() const
Return true if the current position is past the last entry in this list.