From 35274e7b78a3316f9412dbc971d15804fa789f62 Mon Sep 17 00:00:00 2001 From: Panagiotis Bailis Date: Tue, 3 Dec 2024 18:58:16 +0200 Subject: [PATCH] iter --- .../search/retriever/CompoundRetrieverBuilder.java | 4 ++-- .../java/org/elasticsearch/xpack/rank/rrf/RRFFeatures.java | 4 ++-- .../test/rrf/700_rrf_retriever_search_api_compatibility.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/search/retriever/CompoundRetrieverBuilder.java b/server/src/main/java/org/elasticsearch/search/retriever/CompoundRetrieverBuilder.java index 56cf2f3f41142..d9c31b34851ff 100644 --- a/server/src/main/java/org/elasticsearch/search/retriever/CompoundRetrieverBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/retriever/CompoundRetrieverBuilder.java @@ -47,7 +47,7 @@ */ public abstract class CompoundRetrieverBuilder> extends RetrieverBuilder { - public static final NodeFeature CHILD_RETRIEVERS_FILTER_SUPPORT = new NodeFeature("child_retrievers_filter_support"); + public static final NodeFeature INNER_RETRIEVERS_FILTER_SUPPORT = new NodeFeature("inner_retrievers_filter_support"); public record RetrieverSource(RetrieverBuilder retriever, SearchSourceBuilder source) {} @@ -67,7 +67,7 @@ public T addChild(RetrieverBuilder retrieverBuilder) { /** * Returns a clone of the original retriever, replacing the sub-retrievers with - * the provided {@code newChildRetrievers}. + * the provided {@code newChildRetrievers} and the filters with the {@code newPreFilterQueryBuilders}. */ protected abstract T clone(List newChildRetrievers, List newPreFilterQueryBuilders); diff --git a/x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/rrf/RRFFeatures.java b/x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/rrf/RRFFeatures.java index 242d9335bfba2..bb61fa951948d 100644 --- a/x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/rrf/RRFFeatures.java +++ b/x-pack/plugin/rank-rrf/src/main/java/org/elasticsearch/xpack/rank/rrf/RRFFeatures.java @@ -12,7 +12,7 @@ import java.util.Set; -import static org.elasticsearch.search.retriever.CompoundRetrieverBuilder.CHILD_RETRIEVERS_FILTER_SUPPORT; +import static org.elasticsearch.search.retriever.CompoundRetrieverBuilder.INNER_RETRIEVERS_FILTER_SUPPORT; import static org.elasticsearch.xpack.rank.rrf.RRFRetrieverBuilder.RRF_RETRIEVER_COMPOSITION_SUPPORTED; /** @@ -27,6 +27,6 @@ public Set getFeatures() { @Override public Set getTestFeatures() { - return Set.of(CHILD_RETRIEVERS_FILTER_SUPPORT); + return Set.of(INNER_RETRIEVERS_FILTER_SUPPORT); } } diff --git a/x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/700_rrf_retriever_search_api_compatibility.yml b/x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/700_rrf_retriever_search_api_compatibility.yml index 140148c410383..cb30542d80003 100644 --- a/x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/700_rrf_retriever_search_api_compatibility.yml +++ b/x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/700_rrf_retriever_search_api_compatibility.yml @@ -1076,7 +1076,7 @@ setup: --- "rrf retriever with filters to be passed to nested rrf retrievers": - requires: - cluster_features: 'child_retrievers_filter_support' + cluster_features: 'inner_retrievers_filter_support' reason: 'requires fix for properly propagating filters to nested sub-retrievers' - do: @@ -1138,7 +1138,7 @@ setup: rank_constant: 10 } } - size: 3 + size: 10 - match: { hits.total.value: 2 } - match: { hits.hits.0._id: "5" }