Skip to content

Commit b69e817

Browse files
committed
source providers always force a sequential reader to load the fields
1 parent ec220d4 commit b69e817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/search/lookup/ConcurrentSegmentSourceProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class ConcurrentSegmentSourceProvider implements SourceProvider {
3232

3333
ConcurrentSegmentSourceProvider(SourceLoader loader, boolean loadSource) {
3434
this.sourceLoader = loader;
35-
this.storedFieldLoader = StoredFieldLoader.create(loadSource, sourceLoader.requiredStoredFields());
35+
// we force a sequential reader here since it is used during query execution where documents are scanned sequentially
36+
this.storedFieldLoader = StoredFieldLoader.create(loadSource, sourceLoader.requiredStoredFields(), true);
3637
}
3738

3839
@Override

0 commit comments

Comments
 (0)