Skip to content

Commit 9e9e8b3

Browse files
committed
handle semantic field pattern
1 parent 26413b8 commit 9e9e8b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,9 @@ private static SourceFilter maybeExcludeNonSemanticTextVectors(SearchContext con
466466
return null;
467467
}
468468
var lookup = context.getSearchExecutionContext().getMappingLookup();
469-
List<String> inferencePatterns = lookup.inferenceFields().isEmpty() ? null : lookup.inferenceFields().keySet().stream().toList();
469+
List<String> inferencePatterns = lookup.inferenceFields().isEmpty()
470+
? null
471+
: lookup.inferenceFields().keySet().stream().map(f -> f + "*").toList();
470472
var excludes = lookup.getFullNameToFieldType()
471473
.values()
472474
.stream()

0 commit comments

Comments
 (0)