Обновление сопоставления Elasticsearch существующего индексаJAVA

Программисты JAVA общаются здесь
Anonymous
Обновление сопоставления Elasticsearch существующего индекса

Сообщение Anonymous »

У меня есть существующий индекс «my-index» в Elastic. Я пытаюсь обновить этот существующий индекс с помощью новых полей, не теряя данных. Определение имеет неподдерживаемые параметры: ... < /p>
< /blockquote>
Вот сопоставления моего существующего индекса < /p>
{
"mappings": {
"_doc": {
"properties": {
"_class": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 420
}
}
},
"taskType": {
"type": "integer"
},
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"workType": {
"type": "integer"
}
}
}
}
}

< /code>
И мой ожидаемый индекс < /p>
{
"mappings": {
"_doc": {
"mappings": {
"dynamic_templates": [
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "keyword"
}
}
},
{
"dates": {
"match_mapping_type": "date",
"mapping": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
],
"properties": {
"_class": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 420
}
}
},
"date": {
"type": "long"
},
"favorite_color": {
"type": "keyword"
},
"is_active": {
"type": "boolean"
},
"number_float": {
"type": "float"
},
"number_long": {
"type": "long"
},
"taskType": {
"type": "integer"
},
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"updatedDate": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"workType": {
"type": "integer"
}
}
}
}
}
< /code>
Могу ли я обновить существующий индекс, не теряя никаких данных, используя репозиторий Spring-Data-Elasticsearch ??? Спасибо за помощь.

Подробнее здесь: https://stackoverflow.com/questions/757 ... ting-index

Вернуться в «JAVA»