xapian-core  1.4.27
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 
46  PostList * update_after_advance();
47 
48  public:
54  Xapian::PostingSource *source_,
55  double factor_,
56  MultiMatch* matcher,
57  Xapian::doccount shard_index);
58 
59  Xapian::doccount get_termfreq_min() const;
60 
61  Xapian::doccount get_termfreq_est() const;
62 
63  Xapian::doccount get_termfreq_max() const;
64 
65  double get_maxweight() const;
66 
67  Xapian::docid get_docid() const;
68 
69  double get_weight() const;
70 
71  Xapian::termcount get_doclength() const;
72 
73  Xapian::termcount get_unique_terms() const;
74 
75  double recalc_maxweight();
76 
77  PositionList * read_position_list();
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 
87  Xapian::termcount count_matching_subqs() const;
88 
89  std::string get_description() const;
90 };
91 
92 #endif /* XAPIAN_INCLUDED_EXTERNALPOSTLIST_H */
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
Abstract base class for postlists.
Definition: postlist.h:37
This class is used to access a database, or a group of databases.
Definition: database.h:68
Abstract base class for postlists.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
Base class which provides an "external" source of postings.
Definition: postingsource.h:47
Xapian::docid current
Xapian::Internal::opt_intrusive_ptr< Xapian::PostingSource > source
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 iterating term positions in a document.
Definition: positionlist.h:31