2 * @brief Wrapper postlist providing positions for an OR
4 /* Copyright 2017 Olly Betts
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (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
23 #include "orpospostlist.h"
25 OrPosPostList::~OrPosPostList()
31 OrPosPostList::get_termfreq_min() const
33 return pl
->get_termfreq_min();
37 OrPosPostList::get_termfreq_max() const
39 return pl
->get_termfreq_max();
43 OrPosPostList::get_termfreq_est() const
45 return pl
->get_termfreq_est();
49 OrPosPostList::get_termfreq_est_using_stats(const Xapian::Weight::Internal
& stats
) const
51 return pl
->get_termfreq_est_using_stats(stats
);
55 OrPosPostList::get_maxweight() const
57 return pl
->get_maxweight();
61 OrPosPostList::get_docid() const
63 return pl
->get_docid();
67 OrPosPostList::get_doclength() const
69 return pl
->get_doclength();
73 OrPosPostList::get_unique_terms() const
75 return pl
->get_unique_terms();
79 OrPosPostList::get_weight() const
81 return pl
->get_weight();
85 OrPosPostList::at_end() const
91 OrPosPostList::recalc_maxweight()
93 return pl
->recalc_maxweight();
97 OrPosPostList::read_position_list()
99 return position_list
.gather(pl
);
103 OrPosPostList::next(double w_min
)
105 PostList
* result
= pl
->next(w_min
);
114 OrPosPostList::skip_to(Xapian::docid did
, double w_min
)
116 PostList
* result
= pl
->skip_to(did
, w_min
);
125 OrPosPostList::get_description() const
127 string desc
= "OrPosPostList(";
128 desc
+= pl
->get_description();
134 OrPosPostList::get_wdf() const
136 return pl
->get_wdf();
140 OrPosPostList::count_matching_subqs() const
142 return pl
->count_matching_subqs();