mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
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) {
|
private static Mapper.Builder<?,?> createBuilderFromFieldType(final ParseContext context, MappedFieldType fieldType, String currentFieldName) {
|
||||||
Mapper.Builder builder = null;
|
Mapper.Builder builder = null;
|
||||||
if (fieldType instanceof StringFieldType) {
|
if (fieldType instanceof TextFieldType) {
|
||||||
builder = context.root().findTemplateBuilder(context, currentFieldName, "string", XContentFieldType.STRING);
|
|
||||||
} else if (fieldType instanceof TextFieldType) {
|
|
||||||
builder = context.root().findTemplateBuilder(context, currentFieldName, "text", XContentFieldType.STRING);
|
builder = context.root().findTemplateBuilder(context, currentFieldName, "text", XContentFieldType.STRING);
|
||||||
if (builder == null) {
|
if (builder == null) {
|
||||||
builder = new TextFieldMapper.Builder(currentFieldName)
|
builder = new TextFieldMapper.Builder(currentFieldName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user