Document xapian-compact --blocksize takes an argument
[xapian.git] / xapian-core / api / emptypostlist.cc
blob079bcfb3391341c7aaa99dd78918553d477ebc89
1 /** @file emptypostlist.cc
2 * @brief A PostList which contains no entries.
3 */
4 /* Copyright (C) 2009,2010,2011,2015 Olly Betts
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.
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.
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
21 #include <config.h>
23 #include "emptypostlist.h"
25 #include "omassert.h"
27 using namespace std;
29 Xapian::doccount
30 EmptyPostList::get_termfreq_min() const
32 return 0;
35 Xapian::doccount
36 EmptyPostList::get_termfreq_max() const
38 return 0;
41 Xapian::doccount
42 EmptyPostList::get_termfreq_est() const
44 return 0;
47 // OP_WILDCARD which expands to no terms becomes EmptyPostList, and this is
48 // needed if that is used under OP_SYNONYM.
49 TermFreqs
50 EmptyPostList::get_termfreq_est_using_stats(const Xapian::Weight::Internal &) const
52 return TermFreqs();
55 double
56 EmptyPostList::get_maxweight() const
58 return 0;
61 Xapian::docid
62 EmptyPostList::get_docid() const
64 Assert(false);
65 return 0;
68 Xapian::termcount
69 EmptyPostList::get_doclength() const
71 return Xapian::termcount(EmptyPostList::get_docid());
74 Xapian::termcount
75 EmptyPostList::get_unique_terms() const
77 return Xapian::termcount(EmptyPostList::get_docid());
80 double
81 EmptyPostList::get_weight() const
83 Assert(false);
84 return 0;
87 bool
88 EmptyPostList::at_end() const
90 return true;
93 double
94 EmptyPostList::recalc_maxweight()
96 return EmptyPostList::get_maxweight();
99 PostList *
100 EmptyPostList::next(double)
102 return NULL;
105 PostList *
106 EmptyPostList::skip_to(Xapian::docid, double)
108 return NULL;
111 string
112 EmptyPostList::get_description() const
114 return "EmptyPostList";