xapian-core  1.4.25
emptypostlist.cc
Go to the documentation of this file.
1 
4 /* Copyright (C) 2009,2010,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 #include <config.h>
22 
23 #include "emptypostlist.h"
24 
25 #include "omassert.h"
26 
27 using namespace std;
28 
31 {
32  return 0;
33 }
34 
37 {
38  return 0;
39 }
40 
43 {
44  return 0;
45 }
46 
47 // OP_WILDCARD which expands to no terms becomes EmptyPostList, and this is
48 // needed if that is used under OP_SYNONYM.
51 {
52  return TermFreqs();
53 }
54 
55 double
57 {
58  return 0;
59 }
60 
63 {
64  Assert(false);
65  return 0;
66 }
67 
70 {
72 }
73 
76 {
78 }
79 
80 double
82 {
83  Assert(false);
84  return 0;
85 }
86 
87 bool
89 {
90  return true;
91 }
92 
93 double
95 {
97 }
98 
99 PostList *
101 {
102  return NULL;
103 }
104 
105 PostList *
107 {
108  return NULL;
109 }
110 
111 string
113 {
114  return "EmptyPostList";
115 }
#define Assert(COND)
Definition: omassert.h:122
Abstract base class for postlists.
Definition: postlist.h:37
Xapian::docid get_docid() const
Return the current docid.
A PostList which contains no entries.
STL namespace.
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
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.
Various assertion macros.
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.