xapian-core  1.4.30
externalpostlist.h
Go to the documentation of this file.
1 
4 /* Copyright 2008,2009,2011 Olly Betts
5  * Copyright 2009 Lemur Consulting Ltd
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
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.
16  *
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 USA
20  */
21 
22 #ifndef XAPIAN_INCLUDED_EXTERNALPOSTLIST_H
23 #define XAPIAN_INCLUDED_EXTERNALPOSTLIST_H
24 
25 #include "api/postlist.h"
26 
27 namespace Xapian {
28  class PostingSource;
29 }
30 
31 class MultiMatch;
32 
33 class ExternalPostList : public PostList {
36 
38  void operator=(const ExternalPostList &);
39 
41 
43 
44  double factor;
45 
47 
48  public:
54  Xapian::PostingSource *source_,
55  double factor_,
56  MultiMatch* matcher,
57  Xapian::doccount shard_index);
58 
60 
62 
64 
65  double get_maxweight() const;
66 
67  Xapian::docid get_docid() const;
68 
69  double get_weight() const;
70 
72 
74 
75  double recalc_maxweight();
76 
78 
79  PostList * next(double w_min);
80 
81  PostList * skip_to(Xapian::docid, double w_min);
82 
83  PostList * check(Xapian::docid did, double w_min, bool &valid);
84 
85  bool at_end() const;
86 
88 
89  std::string get_description() const;
90 };
91 
92 #endif /* XAPIAN_INCLUDED_EXTERNALPOSTLIST_H */
void operator=(const ExternalPostList &)
Disallow assignment.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
PostList * update_after_advance()
ExternalPostList(const ExternalPostList &)
Disallow copying.
Xapian::termcount get_doclength() const
Return the length of current document.
PositionList * read_position_list()
Read the position list for the term in the current document and return a pointer to it (owned by the ...
PostList * check(Xapian::docid did, double w_min, bool &valid)
Check if the specified docid occurs in this postlist.
double get_maxweight() const
Return an upper bound on what get_weight() can return.
Xapian::docid current
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Xapian::Internal::opt_intrusive_ptr< Xapian::PostingSource > source
double get_weight() const
Return the weight contribution for the current position.
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
Xapian::docid get_docid() const
Return the current docid.
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
bool at_end() const
Return true if the current position is past the last entry in this list.
std::string get_description() const
Return a string description of this object.
This class is used to access a database, or a group of databases.
Definition: database.h:68
Abstract base class for iterating term positions in a document.
Definition: positionlist.h:32
Abstract base class for postlists.
Definition: postlist.h:37
Internal * next()
Advance the current position to the next document in the postlist.
Definition: postlist.h:194
Base class which provides an "external" source of postings.
Definition: postingsource.h:48
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
Abstract base class for postlists.