aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-22 23:32:02 +0100
committerGitHub <noreply@github.com>2024-01-22 23:32:02 +0100
commit48abccf6ee4dd5be89430c406e03519934205d90 (patch)
treeefc4a236bdd696a71a2e8d12a9cc6384a19fc701 /searchlib/src/tests/attribute
parent8ed109fb98d442645f6308c93193831a7f87d70c (diff)
Revert "Support IDocidWithWeightPostingStore for more attribute data types."
Diffstat (limited to 'searchlib/src/tests/attribute')
-rw-r--r--searchlib/src/tests/attribute/bitvector/bitvector_test.cpp3
-rw-r--r--searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp8
2 files changed, 4 insertions, 7 deletions
diff --git a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
index 6e479e1d9db..f612bdda87f 100644
--- a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
+++ b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
@@ -430,8 +430,7 @@ BitVectorTest::test(BasicType bt, CollectionType ct, const vespalib::string &pre
sc = getSearch<VectorType>(tv, filter);
checkSearch(v, std::move(sc), 2, 1022, 205, !filter, true);
const auto* dww = v->as_docid_with_weight_posting_store();
- if ((dww != nullptr) && (bt == BasicType::STRING)) {
- // This way of doing lookup is only supported by string attributes.
+ if (dww != nullptr) {
auto lres = dww->lookup(getSearchStr<VectorType>(), dww->get_dictionary_snapshot());
using DWSI = search::queryeval::DocidWithWeightSearchIterator;
TermFieldMatchData md;
diff --git a/searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp b/searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp
index 2ddd211bd12..c1e12580559 100644
--- a/searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp
+++ b/searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp
@@ -142,11 +142,7 @@ TEST(DirectPostingStoreApiTest, attributes_do_not_support_IDocidPostingStore_int
TEST(DirectPostingStoreApiTest, attributes_support_IDocidWithWeightPostingStore_interface) {
expect_docid_with_weight_posting_store(BasicType::INT64, CollectionType::WSET, true);
- expect_docid_with_weight_posting_store(BasicType::INT32, CollectionType::WSET, true);
expect_docid_with_weight_posting_store(BasicType::STRING, CollectionType::WSET, true);
- expect_docid_with_weight_posting_store(BasicType::INT64, CollectionType::ARRAY, true);
- expect_docid_with_weight_posting_store(BasicType::INT32, CollectionType::ARRAY, true);
- expect_docid_with_weight_posting_store(BasicType::STRING, CollectionType::ARRAY, true);
}
TEST(DirectPostingStoreApiTest, attributes_do_not_support_IDocidWithWeightPostingStore_interface) {
@@ -154,11 +150,13 @@ TEST(DirectPostingStoreApiTest, attributes_do_not_support_IDocidWithWeightPostin
expect_not_docid_with_weight_posting_store(BasicType::INT64, CollectionType::ARRAY, false);
expect_not_docid_with_weight_posting_store(BasicType::INT64, CollectionType::WSET, false);
expect_not_docid_with_weight_posting_store(BasicType::INT64, CollectionType::SINGLE, true);
+ expect_not_docid_with_weight_posting_store(BasicType::INT64, CollectionType::ARRAY, true);
expect_not_docid_with_weight_posting_store(BasicType::STRING, CollectionType::SINGLE, false);
expect_not_docid_with_weight_posting_store(BasicType::STRING, CollectionType::ARRAY, false);
expect_not_docid_with_weight_posting_store(BasicType::STRING, CollectionType::WSET, false);
expect_not_docid_with_weight_posting_store(BasicType::STRING, CollectionType::SINGLE, true);
- expect_not_docid_with_weight_posting_store(BasicType::DOUBLE, CollectionType::ARRAY, true);
+ expect_not_docid_with_weight_posting_store(BasicType::STRING, CollectionType::ARRAY, true);
+ expect_not_docid_with_weight_posting_store(BasicType::INT32, CollectionType::WSET, true);
expect_not_docid_with_weight_posting_store(BasicType::DOUBLE, CollectionType::WSET, true);
}