15 #include "index/reflist/reflist_bitmap.h" 28 template <
typename LIST = NullList>
34 const std::vector<SortContext>& sort,
35 LIST* list = &null_list) :
36 state(
new st(searchResult, sort, list))
48 return state->next(doc);
63 const std::vector<SortContext>& sort,
65 search_result((searchResult.
hasRef(0), searchResult.constImpl()->makeRandom())),
67 sort_iter(sort[0].index->begin()),
68 srlc(sort_iter.getRefList().impl()),
69 sort_rlc(dynamic_cast<RLC_Index*>(srlc.impl())),
82 if (!sort_iter.move(1))
84 srlc = sort_iter.getRefList();
85 sort_rlc =
dynamic_cast<RLC_Index*
>(srlc.impl());
90 uint64 ref(*sort_rlc->getRef());
91 if (search_result->hasRef(&b, ref), b)
94 sort_rlc->move(&b, 1);
107 if (!sort_iter.move(1))
109 srlc = sort_iter.getRefList();
110 sort_rlc =
dynamic_cast<RLC_Index*
>(srlc.impl());
113 uint ref(*sort_rlc->getRef());
114 if (search_result->hasRef(&b, ref), b)
116 sort_rlc->move(&b, 1);
126 const RLC_Bitmap* search_result;
127 const std::vector<SortContext>& sort;
135 std::shared_ptr<st> state;
unsigned long long uint64
bool hasRef(uint64 ref, uint64 *pos=0) const
Does this reference list have this ref?
A cursor into a list of references - e.g., a search result A single reference is an array of uint64s...
Xpace project main namespace