xapian-core  1.4.26
contiguousalldocspostlist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2009,2011 Olly Betts
5  * Copyright (C) 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_CONTIGUOUSALLDOCSPOSTLIST_H
23 #define XAPIAN_INCLUDED_CONTIGUOUSALLDOCSPOSTLIST_H
24 
25 #include <string>
26 
27 #include "database.h"
28 #include "api/leafpostlist.h"
29 
34 
37 
40 
43 
46 
47  public:
50  Xapian::doccount doccount_)
51  : LeafPostList(std::string()),
52  db(db_), did(0), doccount(doccount_) { }
53 
60 
62  Xapian::docid get_docid() const;
63 
66 
69 
71  Xapian::termcount get_wdf() const;
72 
75 
78 
80  PostList * next(double w_min);
81 
83  PostList * skip_to(Xapian::docid target, double w_min);
84 
86  bool at_end() const;
87 
90 
92  std::string get_description() const;
93 };
94 
95 #endif // XAPIAN_INCLUDED_CONTIGUOUSALLDOCSPOSTLIST_H
Abstract base class for postlists.
Definition: postlist.h:37
bool at_end() const
Return true if and only if we&#39;re off the end of the list.
A PostList iterating all docids when they form a contiguous range.
PositionList * read_position_list()
Throws InvalidOperationError.
Xapian::termcount get_wdf_upper_bound() const
Always return 1 (wdf isn&#39;t totally meaningful for us).
Xapian::termcount get_doclength() const
Return the length of current document.
STL namespace.
Abstract base class for leaf postlists.
Definition: leafpostlist.h:39
ContiguousAllDocsPostList(const ContiguousAllDocsPostList &)
Don&#39;t allow copying.
Abstract base class for leaf postlists.
PostList * skip_to(Xapian::docid target, double w_min)
Skip ahead to next document with docid >= target.
Xapian::doccount doccount
The number of documents in the database.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
void operator=(const ContiguousAllDocsPostList &)
Don&#39;t allow assignment.
Xapian::termcount get_unique_terms() const
Return the number of unique terms.
Internal * next()
Advance the current position to the next document in the postlist.
Definition: postlist.h:194
Xapian::doccount get_termfreq() const
Return the term frequency.
Xapian::termcount get_wdf() const
Always return 1 (wdf isn&#39;t totally meaningful for us).
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > db
The database we&#39;re iterating over.
ContiguousAllDocsPostList(Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > db_, Xapian::doccount doccount_)
Constructor.
Xapian::docid did
The current document id.
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
std::string get_description() const
Return a string description of this object.
Xapian::docid get_docid() const
Return the current docid.
PositionList * open_position_list() const
Throws InvalidOperationError.