Skip to content

Commit ba4971a

Browse files
Update server/src/main/java/org/elasticsearch/index/get/ShardGetService.java
lighter Co-Authored-By: Armin Braun <[email protected]>
1 parent 5ed5b0a commit ba4971a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/index/get/ShardGetService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private GetResult innerGetLoadFromStoredFields(String id, String[] storedFields,
214214
DocIdAndVersion docIdAndVersion = get.docIdAndVersion();
215215
// force fetching source if we read from translog and need to recreate stored fields
216216
boolean forceSourceForComputingTranslogStoredFields = get.isFromTranslog() && storedFields != null &&
217-
Stream.of(storedFields).anyMatch(f -> TranslogLeafReader.ALL_FIELD_NAMES.contains(f) == false);
217+
TranslogLeafReader.ALL_FIELD_NAMES.containsAll(Arrays.asList(storedFields)) == false;
218218
FieldsVisitor fieldVisitor = buildFieldsVisitors(storedFields,
219219
forceSourceForComputingTranslogStoredFields ? FetchSourceContext.FETCH_SOURCE : fetchSourceContext);
220220
if (fieldVisitor != null) {

0 commit comments

Comments
 (0)