diff options
-rw-r--r-- | flags/src/main/java/com/yahoo/vespa/flags/Flags.java | 25 | ||||
-rw-r--r-- | searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp | 24 |
2 files changed, 32 insertions, 17 deletions
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index 9c2157c1099..90830b04124 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -255,7 +255,7 @@ public class Flags { public static final UnboundListFlag<String> ALLOWED_ATHENZ_PROXY_IDENTITIES = defineListFlag( "allowed-athenz-proxy-identities", List.of(), String.class, - List.of("bjorncs", "tokle"), "2021-02-10", "2022-09-01", + List.of("bjorncs", "tokle"), "2021-02-10", "2022-11-01", "Allowed Athenz proxy identities", "takes effect at redeployment"); @@ -283,7 +283,7 @@ public class Flags { public static final UnboundDoubleFlag MIN_NODE_RATIO_PER_GROUP = defineDoubleFlag( "min-node-ratio-per-group", 0.0, - List.of("geirst", "vekterli"), "2021-07-16", "2022-09-01", + List.of("geirst", "vekterli"), "2021-07-16", "2022-11-01", "Minimum ratio of nodes that have to be available (i.e. not Down) in any hierarchic content cluster group for the group to be Up", "Takes effect at redeployment", ZONE_ID, APPLICATION_ID); @@ -312,7 +312,7 @@ public class Flags { public static final UnboundBooleanFlag UNORDERED_MERGE_CHAINING = defineFeatureFlag( "unordered-merge-chaining", true, - List.of("vekterli", "geirst"), "2021-11-15", "2022-09-01", + List.of("vekterli", "geirst"), "2021-11-15", "2022-11-01", "Enables the use of unordered merge chains for data merge operations", "Takes effect at redeploy", ZONE_ID, APPLICATION_ID); @@ -339,13 +339,6 @@ public class Flags { "Takes effect at redeployment", ZONE_ID, APPLICATION_ID); - public static final UnboundBooleanFlag ENABLE_SERVER_OCSP_STAPLING = defineFeatureFlag( - "enable-server-ocsp-stapling", false, - List.of("bjorncs"), "2021-12-17", "2022-09-01", - "Enable server OCSP stapling for jdisc containers", - "Takes effect on redeployment", - ZONE_ID, APPLICATION_ID); - public static final UnboundBooleanFlag ENABLE_DATA_HIGHWAY_IN_AWS = defineFeatureFlag( "enable-data-highway-in-aws", false, List.of("hmusum"), "2022-01-06", "2022-10-01", @@ -379,7 +372,7 @@ public class Flags { public static final UnboundIntFlag PERSISTENCE_THROTTLING_WINDOW_SIZE = defineIntFlag( "persistence-throttling-window-size", -1, - List.of("vekterli"), "2022-02-23", "2022-09-01", + List.of("vekterli"), "2022-02-23", "2022-11-01", "If greater than zero, sets both min and max window size to the given number, effectively " + "turning dynamic throttling into a static throttling policy. " + "Only applies if DYNAMIC policy is used.", @@ -388,14 +381,14 @@ public class Flags { public static final UnboundDoubleFlag PERSISTENCE_THROTTLING_WS_RESIZE_RATE = defineDoubleFlag( "persistence-throttling-ws-resize-rate", 3.0, - List.of("vekterli"), "2022-02-23", "2022-09-01", + List.of("vekterli"), "2022-02-23", "2022-11-01", "Sets the dynamic throttle policy resize rate. Only applies if DYNAMIC policy is used.", "Takes effect on redeployment", ZONE_ID, APPLICATION_ID); public static final UnboundBooleanFlag PERSISTENCE_THROTTLING_OF_MERGE_FEED_OPS = defineFeatureFlag( "persistence-throttling-of-merge-feed-ops", true, - List.of("vekterli"), "2022-02-24", "2022-09-01", + List.of("vekterli"), "2022-02-24", "2022-11-01", "If true, each put/remove contained within a merge is individually throttled as if it " + "were a put/remove from a client. If false, merges are throttled at a persistence thread " + "level, i.e. per ApplyBucketDiff message, regardless of how many document operations " + @@ -440,7 +433,7 @@ public class Flags { public static final UnboundBooleanFlag ENABLE_PROXY_PROTOCOL_MIXED_MODE = defineFeatureFlag( "enable-proxy-protocol-mixed-mode", true, - List.of("tokle"), "2022-05-09", "2022-09-01", + List.of("tokle"), "2022-05-09", "2022-11-01", "Enable or disable proxy protocol mixed mode", "Takes effect on redeployment", APPLICATION_ID); @@ -461,7 +454,7 @@ public class Flags { public static final UnboundBooleanFlag USE_YUM_PROXY_V2 = defineFeatureFlag( "use-yumproxy-v2", false, - List.of("tokle"), "2022-05-05", "2022-09-01", + List.of("tokle"), "2022-05-05", "2022-11-01", "Use yumproxy-v2", "Takes effect on host admin restart", HOSTNAME); @@ -475,7 +468,7 @@ public class Flags { public static final UnboundBooleanFlag SEPARATE_METRIC_CHECK_CONFIG = defineFeatureFlag( "separate-metric-check-config", false, - List.of("olaa"), "2022-07-04", "2022-09-01", + List.of("olaa"), "2022-07-04", "2022-11-01", "Determines whether one metrics config check should be written per Vespa node", "Takes effect on next tick", HOSTNAME); diff --git a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp index 311a0e68a58..22b3ae69165 100644 --- a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp +++ b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp @@ -3,11 +3,13 @@ #include <vespa/document/datatype/documenttype.h> #include <vespa/document/datatype/arraydatatype.h> #include <vespa/document/datatype/mapdatatype.h> +#include <vespa/document/datatype/weightedsetdatatype.h> #include <vespa/document/fieldvalue/stringfieldvalue.h> #include <vespa/document/fieldvalue/intfieldvalue.h> #include <vespa/document/fieldvalue/rawfieldvalue.h> #include <vespa/document/fieldvalue/arrayfieldvalue.h> #include <vespa/document/fieldvalue/mapfieldvalue.h> +#include <vespa/document/fieldvalue/weightedsetfieldvalue.h> #include <vespa/document/fieldvalue//document.h> #include <vespa/searchcommon/attribute/config.h> #include <vespa/searchlib/attribute/attributefactory.h> @@ -67,6 +69,7 @@ private: StructDataType::UP _elem_type; ArrayDataType _array_type; MapDataType _map_type; + WeightedSetDataType _wset_type; StructFieldValue::UP make_elem_value(const std::string& name, int weight) const { auto result = std::make_unique<StructFieldValue>(*_elem_type); @@ -81,11 +84,13 @@ public: _doc_type("test"), _elem_type(make_struct_elem_type()), _array_type(*_elem_type), - _map_type(*DataType::STRING, *_elem_type) + _map_type(*DataType::STRING, *_elem_type), + _wset_type(*DataType::STRING, false, false) { _doc_type.addField(Field("array", _array_type)); _doc_type.addField(Field("map", _map_type)); _doc_type.addField(Field("map2", _map_type)); + _doc_type.addField(Field("wset", _wset_type)); auto* result_class = _config.AddResultClass("test", class_id); EXPECT_TRUE(result_class->AddConfigEntry("array", ResType::RES_JSONSTRING)); @@ -117,6 +122,13 @@ public: map2_value.put(StringFieldValue("dummy"), *make_elem_value("dummy", 2)); doc->setValue("map2", map2_value); } + { + WeightedSetFieldValue wset_value(_wset_type); + wset_value.add(StringFieldValue("a"), 13); + wset_value.add(StringFieldValue("b"), 15); + wset_value.add(StringFieldValue("c"), 17); + doc->setValue("wset", wset_value); + } return std::make_unique<DocsumStoreDocument>(std::move(doc)); } }; @@ -242,6 +254,16 @@ TEST_F(MatchedElementsFilterTest, filters_elements_in_map_field_value) expect_filtered("map", {0, 1, 100}, "[]"); } +TEST_F(MatchedElementsFilterTest, filter_elements_in_weighed_set_field_value) +{ + expect_filtered("wset", {}, "[]"); + expect_filtered("wset", {0}, "[{'item':'a','weight':13}]"); + expect_filtered("wset", {1}, "[{'item':'b','weight':15}]"); + expect_filtered("wset", {2}, "[{'item':'c','weight':17}]"); + expect_filtered("wset", {0, 1, 2}, "[{'item':'a','weight':13},{'item':'b','weight':15},{'item':'c','weight':17}]"); + expect_filtered("wset", {0, 1, 100}, "[]"); +} + TEST_F(MatchedElementsFilterTest, matching_elements_fields_is_setup_for_map_field_value) { { |