Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Apr 3, 2024
1 parent 0db189b commit c0403d8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public final class FetchFieldsPhase implements FetchSubPhase {

private static final List<FieldAndFormat> METADATA_FIELDS = List.of(
private static final List<FieldAndFormat> METADATA_FIELDS_FETCHED_BY_DEFAULT = List.of(
new FieldAndFormat(IgnoredFieldMapper.NAME, null),
new FieldAndFormat(RoutingFieldMapper.NAME, null),
new FieldAndFormat(LegacyTypeFieldMapper.NAME, null)
Expand All @@ -63,10 +63,10 @@ public FetchSubPhaseProcessor getProcessor(FetchContext fetchContext) {
} else {
List<FieldAndFormat> fields;
if (storedFieldsContext.fieldNames() == null) {
fields = METADATA_FIELDS;
fields = METADATA_FIELDS_FETCHED_BY_DEFAULT;
} else {
SearchExecutionContext searchExecutionContext = fetchContext.getSearchExecutionContext();
fields = new ArrayList<>(METADATA_FIELDS);
fields = new ArrayList<>(METADATA_FIELDS_FETCHED_BY_DEFAULT);
for (String field : storedFieldsContext.fieldNames()) {
// stored_fields: * gets resolved to all stored fields including metadata fields
// whereas fields:* will exclude metadata fields, which can only be requested explicitly
Expand Down

0 comments on commit c0403d8

Please sign in to comment.