2 * @brief Iterate all document ids when they form a contiguous range.
4 /* Copyright (C) 2007,2008,2009,2011,2017 Olly Betts
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
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.
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
25 #include "contiguousalldocspostlist.h"
33 ContiguousAllDocsPostList::get_docid() const
40 ContiguousAllDocsPostList::get_wdf() const
47 ContiguousAllDocsPostList::read_position_list()
49 // Throws the same exception.
50 return ContiguousAllDocsPostList::open_position_list();
54 ContiguousAllDocsPostList::open_position_list() const
56 throw Xapian::InvalidOperationError("Position lists not meaningful for ContiguousAllDocsPostList");
60 ContiguousAllDocsPostList::next(double)
62 // Docids are contiguous from 1 so termfreq gives the highest docid.
63 if (did
== termfreq
) {
72 ContiguousAllDocsPostList::skip_to(Xapian::docid target
, double)
75 // Docids are contiguous from 1 so termfreq gives the highest docid.
76 if (target
> termfreq
) {
86 ContiguousAllDocsPostList::at_end() const
92 ContiguousAllDocsPostList::get_wdf_upper_bound() const
98 ContiguousAllDocsPostList::get_description() const
100 string
msg("ContiguousAllDocsPostList(1..");
101 msg
+= str(termfreq
);