gpt4 book ai didi

elasticsearch - Elasticsearch 7.3.0,拒绝将映射更新更新为[],因为最终映射将具有不止一种类型:[1、2]

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

我是Elasticsearch的新手,我看到了很多类似的帖子。但是我不知道该怎么解决。
这是我的网址http://localhost:9200/review/1
我的第一个数据已发布

{
"id": 0,
"country": "Italy",
"description": "Aromas include tropical fruit, broom, brimstone and dried herb. The palate isn't overly expressive, offering unripened apple, citrus and dried sage alongside brisk acidity.",
"designation": "Vulkà Bianco",
"points": 87,
"price": 0.0,
"province": "Sicily & Sardinia",
"region_1": "Etna",
"region_2": "",
"taster_name": "Kerin O’Keefe",
"taster_twitter_handle": "@kerinokeefe",
"title": "Nicosia 2013 Vulkà Bianco (Etna)",
"variety": "White Blend",
"winery": "Nicosia",
"active" : true
}

我的回复

{
"_index": "review",
"_type": "1",
"_id": "_RsOl3IB2NCkPvBhHoPl",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 0,
"_primary_term": 1
}

当我尝试进行第二次数据处理时,出现错误

Rejecting mapping update to [review] as the final mapping would have more than 1 type: [1, 2]



由于映射类型,我知道此错误。我正在使用7.3.0版本。我要做的

最佳答案

您缺少文档类型。您需要按照以下步骤进行POST:

                                           this part is missing
|
v
First document: `PUT http://localhost:9200/review/_doc/1`

Second document: `PUT http://localhost:9200/review/_doc/2`
^
|
this part is missing

关于elasticsearch - Elasticsearch 7.3.0,拒绝将映射更新更新为[],因为最终映射将具有不止一种类型:[1、2],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62274484/

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