gpt4 book ai didi

mapping - 通过 API 进行 Elasticsearch _default_ 映射

转载 作者:行者123 更新时间:2023-12-03 00:28:09 24 4
gpt4 key购买 nike

我默认调用映射,所有数据类型为字符串-

curl -XPUT 'http://localhost:9200/_all/_default_/_mapping' -d '
{
"mappings": {
"_default_": {
"dynamic_templates": [
{
"match": "*",
"mapping": {
"type": "string"
}
}
]
}
}
}
'

映射不起作用,所以我打电话来验证 -
curl -XGET 'http://localhost:9200/_all/_mapping'
{
"logstash-2014.02.05": {
"_default_": {
"properties": {}
}
}

为什么属性部分是空的?

最佳答案

您应该删除 mappings来自您的 PUT 请求的 key 。您只需指定 mappings创建索引时,而不是更新映射时。

关于mapping - 通过 API 进行 Elasticsearch _default_ 映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21578103/

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