Make MappedFieldType#meta final (#59383)

The MappedFieldType#updateMeta method was used for testing equality checks, but we
no longer need these after #59212 , so we can remove this method and make meta final.
This commit is contained in:
Alan Woodward 2020-07-14 10:44:24 +01:00 committed by Alan Woodward
parent c349fdcb89
commit 27067de699
2 changed files with 1 additions and 9 deletions

View File

@ -324,7 +324,6 @@ public abstract class FieldMapper extends Mapper implements Cloneable {
FieldType other = mergeWith.fieldType;
MappedFieldType otherm = mergeWith.mappedFieldType;
this.mappedFieldType.updateMeta(otherm.meta());
boolean indexed = fieldType.indexOptions() != IndexOptions.NONE;
boolean mergeWithIndexed = other.indexOptions() != IndexOptions.NONE;

View File

@ -64,10 +64,10 @@ public abstract class MappedFieldType {
private final boolean docValues;
private final boolean isIndexed;
private final TextSearchInfo textSearchInfo;
private final Map<String, String> meta;
private float boost;
private NamedAnalyzer indexAnalyzer;
private boolean eagerGlobalOrdinals;
private Map<String, String> meta;
public MappedFieldType(String name, boolean isIndexed, boolean hasDocValues, TextSearchInfo textSearchInfo, Map<String, String> meta) {
setBoost(1.0f);
@ -348,13 +348,6 @@ public abstract class MappedFieldType {
return meta;
}
/**
* Associate metadata with this field.
*/
public void updateMeta(Map<String, String> meta) {
this.meta = meta;
}
/**
* Returns information on how any text in this field is indexed
*