mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
MetadataFieldMapper.Builder.build() doesn't need ContentPath (#64636)
Metadata fields are always instantiated at the root of a document, so they don't need to take the ContentPath in their build() methods. Also converts a couple of metadata parsers from Configurable to Fixed, as they don't have any parameters.
This commit is contained in:
parent
bd4703250f
commit
61b51ba822
11 changed files with 15 additions and 91 deletions
|
@ -20,7 +20,6 @@
|
|||
package org.elasticsearch.index.mapper.size;
|
||||
|
||||
import org.elasticsearch.common.Explicit;
|
||||
import org.elasticsearch.index.mapper.ContentPath;
|
||||
import org.elasticsearch.index.mapper.FieldMapper;
|
||||
import org.elasticsearch.index.mapper.MappedFieldType;
|
||||
import org.elasticsearch.index.mapper.MetadataFieldMapper;
|
||||
|
@ -53,7 +52,7 @@ public class SizeFieldMapper extends MetadataFieldMapper {
|
|||
}
|
||||
|
||||
@Override
|
||||
public SizeFieldMapper build(ContentPath contentPath) {
|
||||
public SizeFieldMapper build() {
|
||||
return new SizeFieldMapper(enabled.getValue(), new NumberFieldType(NAME, NumberType.INTEGER));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue