summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchlib/src/tests/attribute/bitvector/bitvector_test.cpp20
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp4
2 files changed, 12 insertions, 12 deletions
diff --git a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
index 63c0b784018..dfea4901180 100644
--- a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
+++ b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
@@ -43,9 +43,8 @@ struct BitVectorTest
{
using AttributePtr = AttributeVector::SP;
- BitVectorTest() { }
-
- ~BitVectorTest() { }
+ BitVectorTest();
+ ~BitVectorTest();
template <typename VectorType>
VectorType & as(AttributePtr &v);
@@ -102,6 +101,9 @@ struct BitVectorTest
test(BasicType bt, CollectionType ct, const vespalib::string &pref);
};
+BitVectorTest::BitVectorTest() = default;
+BitVectorTest::~BitVectorTest() = default;
+
template <typename VectorType>
VectorType &
@@ -427,16 +429,14 @@ BitVectorTest::test(BasicType bt, CollectionType ct, const vespalib::string &pre
SearchContextPtr sc = getSearch<VectorType>(tv, true);
checkSearch(v, std::move(sc), 2, 1022, 205, !fastSearch && !filter, true);
- sc = getSearch<VectorType>(tv, false);
+ sc = getSearch<VectorType>(tv, filter);
checkSearch(v, std::move(sc), 2, 1022, 205, !filter, true);
const search::IDocumentWeightAttribute *dwa = v->asDocumentWeightAttribute();
if (dwa != nullptr) {
- search::IDocumentWeightAttribute::LookupResult lres =
- dwa->lookup(getSearchStr<VectorType>(), dwa->get_dictionary_snapshot());
+ auto lres = dwa->lookup(getSearchStr<VectorType>(), dwa->get_dictionary_snapshot());
using DWSI = search::queryeval::DocumentWeightSearchIterator;
- using SI = search::queryeval::SearchIterator;
TermFieldMatchData md;
- SI::UP dwsi(new DWSI(md, *dwa, lres));
+ auto dwsi = std::make_unique<DWSI>(md, *dwa, lres);
if (!filter) {
TEST_DO(checkSearch(v, std::move(dwsi), md, 2, 1022, 205, !filter, true));
} else {
@@ -445,13 +445,13 @@ BitVectorTest::test(BasicType bt, CollectionType ct, const vespalib::string &pre
}
}
populate(tv, 2, 973, false);
- sc = getSearch<VectorType>(tv, true);
+ sc = getSearch<VectorType>(tv, filter);
checkSearch(v, std::move(sc), 977, 1022, 10, !filter, true);
populate(tv, 2, 973, true);
sc = getSearch<VectorType>(tv, true);
checkSearch(v, std::move(sc), 2, 1022, 205, !fastSearch && !filter, true);
addDocs(v, 15000);
- sc = getSearch<VectorType>(tv, true);
+ sc = getSearch<VectorType>(tv, filter);
checkSearch(v, std::move(sc), 2, 1022, 205, !filter, true);
populateAll(tv, 10, 15000, true);
sc = getSearch<VectorType>(tv, true);
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index b9f4fd5ceca..2e9e5470b5f 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;