mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Rename Mapper#simpleName to Mapper#leafName (#110030)
This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while the MappedFieldType name does. We have method called simpleName to signal that, but leafName signals that more clearly and aligns with the name we have recently introduced in Mapper.Builder (renamed from name to leafName). Relates to #109971
This commit is contained in:
parent
e203b0c640
commit
54e7b4d93b
58 changed files with 148 additions and 151 deletions
|
@ -564,7 +564,7 @@ public class AnnotatedTextFieldMapper extends FieldMapper {
|
|||
@Override
|
||||
public FieldMapper.Builder getMergeBuilder() {
|
||||
return new Builder(
|
||||
simpleName(),
|
||||
leafName(),
|
||||
builder.indexCreatedVersion,
|
||||
builder.analyzers.indexAnalyzers,
|
||||
builder.isSyntheticSourceEnabledViaIndexMode
|
||||
|
@ -584,7 +584,7 @@ public class AnnotatedTextFieldMapper extends FieldMapper {
|
|||
);
|
||||
}
|
||||
if (fieldType.stored()) {
|
||||
return new StringStoredFieldFieldLoader(name(), simpleName(), null) {
|
||||
return new StringStoredFieldFieldLoader(name(), leafName(), null) {
|
||||
@Override
|
||||
protected void write(XContentBuilder b, Object value) throws IOException {
|
||||
b.value((String) value);
|
||||
|
@ -594,7 +594,7 @@ public class AnnotatedTextFieldMapper extends FieldMapper {
|
|||
|
||||
var kwd = TextFieldMapper.SyntheticSourceHelper.getKeywordFieldMapperForSyntheticSource(this);
|
||||
if (kwd != null) {
|
||||
return kwd.syntheticFieldLoader(simpleName());
|
||||
return kwd.syntheticFieldLoader(leafName());
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue