gpt4 book ai didi

elasticsearch - Elasticsearch 错误-期望双引号开头字段名称

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

我正在尝试为名为region的新索引创建映射。请在下面找到我的映射文件。

PUT region
{
"mappings": {
"doc": {
"properties": {
"catalog_product_id": {
"type": "long",
},
"id": {
"type": "long"
},
"region_id":{
"type": "text"
},
"region_type":{
"type" : "text"
}
}

}
}
}
}

在尝试执行此映射脚本时遇到以下错误
was expecting double-quote to start field name

最佳答案

我使用Kibana仔细检查了您的映射,似乎JSON格式存在解析错误。删除,之后的"type": "long",,并从末尾删除}之一,如下所示:

PUT region
{
"mappings": {
"doc": {
"properties": {
"catalog_product_id": {
"type": "long"
},
"id": {
"type": "long"
},
"region_id":{
"type": "text"
},
"region_type":{
"type" : "text"
}
}
}
}
}

关于elasticsearch - Elasticsearch 错误-期望双引号开头字段名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51536211/

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