Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
pgomulka committed Oct 27, 2021
1 parent 7a28f1b commit 3bbd2fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions server/src/main/java/org/elasticsearch/index/IndexMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public void completeMappings(MappingParserContext context, Map<String, Object> m
DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER,
context.scriptCompiler(),
DateFieldMapper.IGNORE_MALFORMED_SETTING.get(context.getSettings()),
context.getIndexSettings().getIndexVersionCreated(),
context.getIndexSettings().getIndex().getName()
context.getIndexSettings().getIndexVersionCreated()
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.xcontent.XContentType;
import org.elasticsearch.core.Nullable;
import org.elasticsearch.xcontent.XContentType;

import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -94,8 +94,8 @@ Mapping parse(@Nullable String type, CompressedXContent source) throws MapperPar

private Mapping parse(String type, Map<String, Object> mapping) throws MapperParsingException {
MappingParserContext parserContext = parserContextSupplier.get();
RootObjectMapper rootObjectMapper
= rootObjectTypeParser.parse(type, mapping, parserContext).build(MapperBuilderContext.ROOT);
RootObjectMapper.Builder rootObjectMapperBuilder = rootObjectTypeParser.parse(type, mapping, parserContext);
parserContext.getIndexSettings().getMode().completeMappings(parserContext, mapping, rootObjectMapperBuilder);

Map<Class<? extends MetadataFieldMapper>, MetadataFieldMapper> metadataMappers = metadataMappersSupplier.get();
Map<String, Object> meta = null;
Expand Down Expand Up @@ -144,7 +144,7 @@ private Mapping parse(String type, Map<String, Object> mapping) throws MapperPar
checkNoRemainingFields(mapping, "Root mapping definition has unsupported parameters: ");

return new Mapping(
rootObjectMapper,
rootObjectMapperBuilder.build(MapperBuilderContext.ROOT),
metadataMappers.values().toArray(new MetadataFieldMapper[0]),
meta);
}
Expand Down

0 comments on commit 3bbd2fe

Please sign in to comment.