Remove deprecated FieldNamesFieldMapper.Builder#index (#37305)

The method calls "enabled" in addition to what the super.index() does, but this
seems to be done explicitely now in the TypeParsers `parse` method. The removed
method has been deprecated since at least 6.0. Also making some of the Builders
methods and ctos private since they are only used internally in this class.
This commit is contained in:
Christoph Büscher 2019-01-22 12:12:21 +01:00 committed by GitHub
parent 757932a975
commit 0a93a0358b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 10 deletions

View File

@ -73,21 +73,14 @@ public class FieldNamesFieldMapper extends MetadataFieldMapper {
}
}
public static class Builder extends MetadataFieldMapper.Builder<Builder, FieldNamesFieldMapper> {
private static class Builder extends MetadataFieldMapper.Builder<Builder, FieldNamesFieldMapper> {
private boolean enabled = Defaults.ENABLED;
public Builder(MappedFieldType existing) {
private Builder(MappedFieldType existing) {
super(Defaults.NAME, existing == null ? Defaults.FIELD_TYPE : existing, Defaults.FIELD_TYPE);
}
@Override
@Deprecated
public Builder index(boolean index) {
enabled(index);
return super.index(index);
}
public Builder enabled(boolean enabled) {
private Builder enabled(boolean enabled) {
this.enabled = enabled;
return this;
}