xapian-core  1.4.19
andnotpostlist.h
Go to the documentation of this file.
1 
4 /* Copyright 1999,2000,2001 BrightStation PLC
5  * Copyright 2002 Ananova Ltd
6  * Copyright 2003,2004,2009,2011 Olly Betts
7  * Copyright 2009 Lemur Consulting Ltd
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 #ifndef OM_HGUARD_ANDNOTPOSTLIST_H
26 #define OM_HGUARD_ANDNOTPOSTLIST_H
27 
28 #include "branchpostlist.h"
29 
36  private:
38 
41 
42  PostList *advance_to_next_match(double w_min, PostList *ret);
43  public:
48  const Xapian::Weight::Internal & stats) const;
49 
50  Xapian::docid get_docid() const;
51  double get_weight() const;
52  double get_maxweight() const;
53 
54  double recalc_maxweight();
55 
56  PostList *next(double w_min);
57  PostList *skip_to(Xapian::docid did, double w_min);
58  bool at_end() const;
59 
60  std::string get_description() const;
61 
65  virtual Xapian::termcount get_doclength() const;
66 
67  virtual Xapian::termcount get_unique_terms() const;
68 
70  PostList *right,
71  MultiMatch *matcher_,
72  Xapian::doccount dbsize_);
73 
75  double w_min,
76  Xapian::docid lh,
77  Xapian::docid rh);
78 
82  Xapian::termcount get_wdf() const;
83 
85 };
86 
87 #endif /* OM_HGUARD_ANDNOTPOSTLIST_H */
Abstract base class for postlists.
Definition: postlist.h:37
double get_maxweight() const
Return an upper bound on what get_weight() can return.
Xapian::termcount get_wdf() const
get_wdf() for ANDNOT postlists returns the wdf of the left hand side.
AndNotPostList(PostList *left, PostList *right, MultiMatch *matcher_, Xapian::doccount dbsize_)
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
Base class for postlists which are generated by merging two sub-postlists.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
virtual Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
double get_weight() const
Return the weight contribution for the current position.
Xapian::docid rhead
virtual Xapian::termcount get_doclength() const
Return the document length of the document the current term comes from.
bool at_end() const
Return true if the current position is past the last entry in this list.
virtual base class for branched types of postlist
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::docid lhead
PostList * advance_to_next_match(double w_min, PostList *ret)
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
The frequencies for a term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
PostList * sync_and_skip_to(Xapian::docid id, double w_min, Xapian::docid lh, Xapian::docid rh)
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
PostList * skip_to(Xapian::docid did, double w_min)
Skip forward to the specified docid.
std::string get_description() const
Return a string description of this object.
Xapian::doccount dbsize
Number of documents in the database this postlist is across.
A postlist generated by taking one postlist (the left-hand postlist), and removing any documents whic...
Xapian::docid get_docid() const
Return the current docid.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.