gpt4 book ai didi

elasticsearch - Elasticsearch获取索引创建脚本

转载 作者:行者123 更新时间:2023-12-03 01:45:41 25 4
gpt4 key购买 nike

我得到了具有不同映射的模型的一个索引

{
"user_index": {
"aliases": {
"entities": {}
},
"mappings": {
"user": {
"dynamic": "strict",
"_timestamp": {},
"properties": {
"firstName": {
"type": "string",
"index": "not_analyzed"
},
"id": {
"type": "string",
"index": "not_analyzed"
} ....

我想将id类型更改为 long
我如何才能获取并复制此索引创建脚本,并只需最少的工作(例如在工作台中获取mysql的导入脚本)就可以更改字段的1种类型?

最佳答案

我猜您可以通过所需的更改推送新的索引映射,然后使用reindex api复制旧索引中的数据。

关于elasticsearch - Elasticsearch获取索引创建脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44138021/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com