Skip to content

Commit

Permalink
Update server/src/main/java/org/elasticsearch/index/query/InnerHitCon…
Browse files Browse the repository at this point in the history
…textBuilder.java

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
  • Loading branch information
kderusso and Mikep86 authored Dec 12, 2024
1 parent 278e860 commit 1fc6125
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public InnerHitBuilder innerHitBuilder() {
public static void extractInnerHits(QueryBuilder query, Map<String, InnerHitContextBuilder> innerHitBuilders) {
if (query instanceof AbstractQueryBuilder) {
((AbstractQueryBuilder<?>) query).extractInnerHitBuilders(innerHitBuilders);
} else if (query instanceof InterceptedQueryBuilderWrapper) {
} else if (query instanceof InterceptedQueryBuilderWrapper interceptedQuery) {
// Unwrap an intercepted query here
extractInnerHits(((InterceptedQueryBuilderWrapper) query).queryBuilder, innerHitBuilders);
extractInnerHits(interceptedQuery.queryBuilder, innerHitBuilders);
} else {
throw new IllegalStateException(
"provided query builder [" + query.getClass() + "] class should inherit from AbstractQueryBuilder, but it doesn't"
Expand Down

0 comments on commit 1fc6125

Please sign in to comment.