gpt4 book ai didi

elasticsearch - Elasticsearch 中的热切加载

转载 作者:行者123 更新时间:2023-12-02 23:29:36 25 4
gpt4 key购买 nike

我正在尝试 flex 搜索。
我索引如下-

{"index":{"_index":"appname-ticketing","_type":"BLR"}}

我的映射如下-
    {
"appname-ticketing" : {
"mappings" : {
"BLR" : {
"AppName" : {
"type" : "string",
"index" : "not_analyzed"
}
},
"ABC" : {
"AppName" : {
"type" : "string",
"index" : "not_analyzed"
}
}
}
}

所以索引是应用程序名称票证,类型是BLR。
对于 AppName字段,我想启用热切加载。
这就是我在做的
curl -XPUT localhost:9200/appname-ticketing/BLR/_mapping/AppName -d"
{
\"tags\": {
\"type\": \"string\", \"index\" : \"not_analyzed\",
\"fielddata\": {
\"loading\" : \"eager\"
}
}
}"

但我收到以下错误-
No handler found for uri [/appname-ticketing/BLR/_mapping/AppName] and method [PUT]

最佳答案

您应该这样做:

curl -XPUT localhost:9200/appname-ticketing/BLR/_mapping -d '{
"properties": {
"AppName": {
"type": "string",
"index" : "not_analyzed",
"fielddata": {
"loading" : "eager"
}
}
}
}'

关于elasticsearch - Elasticsearch 中的热切加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37937510/

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