diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-14 19:37:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-11-14 19:37:36 +0000 |
commit | 16d6f96c09716227e9b847c4c4e534e692401a02 (patch) | |
tree | 6616fc2e8b0b94e44c746566366e9237fb02b88b | |
parent | 4080369f2b07de530c859d7d9f0935afdc4f7eb4 (diff) |
- Create bitvector when freqency > 1/64, up from 1/32
- Destruct bitvector when frequency falls below 1/128 instead of 1/64.
A posting is currently 8 bytes(docid+weight) + btree overhead, so that will give a smoother memory cost.
In addition filter queries should be faster.
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/postingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp index 8bee8b3f7f7..ca56274bd36 100644 --- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp +++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp @@ -44,8 +44,8 @@ PostingStoreBase2::resizeBitVectors(uint32_t newSize, uint32_t newCapacity) newSize = newCapacity; if (newSize == _bvSize && newCapacity == _bvCapacity) return false; - _minBvDocFreq = std::max(newSize >> 6, 64u); - _maxBvDocFreq = std::max(newSize >> 5, 128u); + _minBvDocFreq = std::max(newSize >> 7, 64u); + _maxBvDocFreq = std::max(newSize >> 6, 128u); if (_bvs.empty()) { _bvSize = newSize; _bvCapacity = newCapacity; |