2 * @brief Return document ids matching a range test on a specified doc value.
4 /* Copyright 2007,2008,2011,2013 Olly Betts
5 * Copyright 2008 Lemur Consulting Ltd
6 * Copyright 2010 Richard Boulton
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #include "valuegepostlist.h"
29 #include "unicode/description_append.h"
34 ValueGePostList::next(double)
37 if (!valuelist
) valuelist
= db
->open_value_list(slot
);
39 while (!valuelist
->at_end()) {
40 const string
& v
= valuelist
->get_value();
41 if (v
>= begin
) return NULL
;
49 ValueGePostList::skip_to(Xapian::docid did
, double)
52 if (!valuelist
) valuelist
= db
->open_value_list(slot
);
53 valuelist
->skip_to(did
);
54 while (!valuelist
->at_end()) {
55 const string
& v
= valuelist
->get_value();
56 if (v
>= begin
) return NULL
;
64 ValueGePostList::check(Xapian::docid did
, double, bool &valid
)
67 AssertRelParanoid(did
, <=, db
->get_lastdocid());
68 if (!valuelist
) valuelist
= db
->open_value_list(slot
);
69 valid
= valuelist
->check(did
);
73 const string
& v
= valuelist
->get_value();
79 ValueGePostList::get_description() const
81 string desc
= "ValueGePostList(";
84 description_append(desc
, begin
);