diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-23 15:13:39 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-23 15:13:39 +0000 |
commit | e7527aae21d3d336f04a261d8828c47cebc59c94 (patch) | |
tree | 134d11229a6e9cd41a26d3a46c47ebbc6a09fa3c /searchcore | |
parent | 692121a90e14acc7ddb65dbc0ff7a2922ddd6713 (diff) |
Count number of bits to create a better estimate of number of hits it will produce.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp index 57f8be576db..84fe39c56b6 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp @@ -198,7 +198,8 @@ public: _activeLids(activeLids), _matchDataVector() { - setEstimate(HitEstimate(_activeLids.size(), false)); + size_t numHits = _activeLids.countTrueBits(); + setEstimate(HitEstimate(numHits, (numHits == 0))); } bool isWhiteList() const override { return true; } |