diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-04 22:15:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 22:15:43 +0200 |
commit | 5c9eafb455d9d9f012d2cbad1eb023e141364e93 (patch) | |
tree | e189c8f2b87253c49f7a1e6b320fe74d0912c800 | |
parent | 9eb82078bfb84f265f3425f25610bcc1a80fc0d1 (diff) |
Revert "Drop checking for valid lid temporarily"
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp index 38336009f14..52d7d906d4c 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp @@ -68,22 +68,28 @@ fillPartialResult(ResultProcessor::Context & context, size_t totalHits, size_t n PartialResult &pr = *context.result; pr.totalHits(totalHits); size_t maxHits = std::min(numHits, pr.maxSize()); - //TODO :const search::BitVector & validLids = context._validLids; + const search::BitVector & validLids = context._validLids; if (pr.hasSortData()) { FastS_SortSpec &spec = context.sort->sortSpec; for (size_t i = 0; i < maxHits; ++i) { - pr.add(hits[i], spec.getSortRef(i)); + if (validLids.testBit(hits[i].getDocId())) { + pr.add(hits[i], spec.getSortRef(i)); + } } } else { for (size_t i = 0; i < maxHits; ++i) { - pr.add(hits[i]); + if (validLids.testBit(hits[i].getDocId())) { + pr.add(hits[i]); + } } if ((bits != nullptr) && (pr.size() < pr.maxSize())) { for (unsigned int bitId = bits->getFirstTrueBit(); (bitId < bits->size()) && (pr.size() < pr.maxSize()); bitId = bits->getNextTrueBit(bitId + 1)) { - pr.add(search::RankedHit(bitId)); + if (validLids.testBit(bitId)) { + pr.add(search::RankedHit(bitId)); + } } } } |