aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/direct_posting_store
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2024-01-22 13:45:32 +0000
committerGeir Storli <geirst@yahooinc.com>2024-01-24 09:56:58 +0000
commit233da25510548e8a1033e1bbf0a506135ea85b42 (patch)
tree309838b1750e6c45c155098f539ada45f916bc96 /searchlib/src/tests/attribute/direct_posting_store
parent2a43344d217ab065425e880cd35be54542423ce8 (diff)
Support IDocidWithWeightPostingStore for more attribute data types.
This includes array types (in addition to weighted set) and all integer types. This change also aligns the blueprint and iterator implementations used for WeightedSetTerm and InTerm, making the performance of WeightedSetTerm more similar to InTerm. In particular an attribute with "rank: filter" uses a more optimal search iterator for WeightedSetTerm.
Diffstat (limited to 'searchlib/src/tests/attribute/direct_posting_store')
-rw-r--r--searchlib/src/tests/attribute/direct_posting_store/direct_posting_store_test.cpp8
1 files changed, 5 insertions, 3 deletions
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 c1e12580559..2ddd211bd12 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,7 +142,11 @@ 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) {
@@ -150,13 +154,11 @@ 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::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::ARRAY, true);
expect_not_docid_with_weight_posting_store(BasicType::DOUBLE, CollectionType::WSET, true);
}