Skip to content

Commit

Permalink
Renaming fields
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Mar 13, 2024
1 parent f8d443b commit 12b2902
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class FieldInferenceMetadata implements Diffable<FieldInferenceMetadata>,
public static final FieldInferenceMetadata EMPTY = new FieldInferenceMetadata(ImmutableOpenMap.of(), ImmutableOpenMap.of());

public static final ParseField INFERENCE_FOR_FIELDS_FIELD = new ParseField("inference_for_fields");
public static final ParseField COPY_FROM_FIELDS_FIELD = new ParseField("copy_from_fields");
public static final ParseField SOURCE_FIELDS_FIELD = new ParseField("source_fields");

public FieldInferenceMetadata(
ImmutableOpenMap<String, String> inferenceIdsForFields,
Expand Down Expand Up @@ -87,7 +87,7 @@ public void writeTo(StreamOutput out) throws IOException {
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.field(INFERENCE_FOR_FIELDS_FIELD.getPreferredName(), inferenceIdForField);
builder.field(COPY_FROM_FIELDS_FIELD.getPreferredName(), sourceFields);
builder.field(SOURCE_FIELDS_FIELD.getPreferredName(), sourceFields);

return builder;
}
Expand All @@ -107,7 +107,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
HashMap::new,
v -> v.list().stream().map(Object::toString).collect(Collectors.toSet())
),
COPY_FROM_FIELDS_FIELD
SOURCE_FIELDS_FIELD
);
}

Expand Down

0 comments on commit 12b2902

Please sign in to comment.