|
@@ -68,7 +68,7 @@ class FieldTypeLookup implements Iterable<MappedFieldType> {
|
|
|
MappedFieldType fieldType = fieldMapper.fieldType();
|
|
|
MappedFieldType fullNameFieldType = fullName.get(fieldType.name());
|
|
|
|
|
|
- if (!Objects.equals(fieldType, fullNameFieldType)) {
|
|
|
+ if (Objects.equals(fieldType, fullNameFieldType) == false) {
|
|
|
fullName = fullName.copyAndPut(fieldType.name(), fieldType);
|
|
|
}
|
|
|
}
|
|
@@ -76,7 +76,11 @@ class FieldTypeLookup implements Iterable<MappedFieldType> {
|
|
|
for (FieldAliasMapper fieldAliasMapper : fieldAliasMappers) {
|
|
|
String aliasName = fieldAliasMapper.name();
|
|
|
String path = fieldAliasMapper.path();
|
|
|
- aliases = aliases.copyAndPut(aliasName, path);
|
|
|
+
|
|
|
+ String existingPath = aliases.get(aliasName);
|
|
|
+ if (Objects.equals(path, existingPath) == false) {
|
|
|
+ aliases = aliases.copyAndPut(aliasName, path);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return new FieldTypeLookup(fullName, aliases);
|