Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
pmpailis committed Dec 3, 2024
1 parent a8baf0a commit 35274e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*/
public abstract class CompoundRetrieverBuilder<T extends CompoundRetrieverBuilder<T>> 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) {}

Expand All @@ -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<RetrieverSource> newChildRetrievers, List<QueryBuilder> newPreFilterQueryBuilders);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -27,6 +27,6 @@ public Set<NodeFeature> getFeatures() {

@Override
public Set<NodeFeature> getTestFeatures() {
return Set.of(CHILD_RETRIEVERS_FILTER_SUPPORT);
return Set.of(INNER_RETRIEVERS_FILTER_SUPPORT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -1138,7 +1138,7 @@ setup:
rank_constant: 10
}
}
size: 3
size: 10

- match: { hits.total.value: 2 }
- match: { hits.hits.0._id: "5" }
Expand Down

0 comments on commit 35274e7

Please sign in to comment.