Fix a type check that is always false (#27726)
DocumentParser: The checks for Text and Keyword were masked by the earlier check for String, which they are child classes of. As String field types are no longer supported, this check can be removed.
This commit is contained in:
parent
36f8531bf4
commit
ea8e3661d0
|
@ -625,9 +625,7 @@ final class DocumentParser {
|
|||
|
||||
private static Mapper.Builder<?,?> createBuilderFromFieldType(final ParseContext context, MappedFieldType fieldType, String currentFieldName) {
|
||||
Mapper.Builder builder = null;
|
||||
if (fieldType instanceof StringFieldType) {
|
||||
builder = context.root().findTemplateBuilder(context, currentFieldName, "string", XContentFieldType.STRING);
|
||||
} else if (fieldType instanceof TextFieldType) {
|
||||
if (fieldType instanceof TextFieldType) {
|
||||
builder = context.root().findTemplateBuilder(context, currentFieldName, "text", XContentFieldType.STRING);
|
||||
if (builder == null) {
|
||||
builder = new TextFieldMapper.Builder(currentFieldName)
|
||||
|
|
Loading…
Reference in New Issue