Read committed doc id limit before getting reader bitvector from
growable bitvector.
@@ -104,6 +104,7 @@ namespace {
class BitVectorSearchContext : public attribute::SearchContext, public attribute::IPostingListSearchContext
{
private:
+ uint32_t _doc_id_limit;
const BitVector & _bv;
bool _invert;
bool _valid;
@@ -122,7 +123,7 @@ private:
}
public:
- BitVectorSearchContext(std::unique_ptr<QueryTermSimple> qTerm, const SingleBoolAttribute & bv);
+ BitVectorSearchContext(std::unique_ptr<QueryTermSimple> qTerm, const SingleBoolAttribute & attr);
std::unique_ptr<queryeval::SearchIterator>
createFilterIterator(fef::TermFieldMatchData * matchData, bool strict) override;
@@ -133,6 +134,7 @@ public:
BitVectorSearchContext::BitVectorSearchContext(std::unique_ptr<QueryTermSimple> qTerm, const SingleBoolAttribute & attr)
: SearchContext(attr),
+ _doc_id_limit(attr.getCommittedDocIdLimit()),
_bv(attr.getBitVector()),
_invert(false),
_valid(qTerm->isValid())
@@ -152,7 +154,7 @@ BitVectorSearchContext::createFilterIterator(fef::TermFieldMatchData * matchData
if (!valid()) {
return std::make_unique<queryeval::EmptySearch>();
}
- return BitVectorIterator::create(&_bv, _attr.getCommittedDocIdLimit(), *matchData, strict, _invert);
+ return BitVectorIterator::create(&_bv, _doc_id_limit, *matchData, strict, _invert);
}
void
