gpt4 book ai didi

java - 获取错误 Fielddata 在 CURL 中默认在文本字段上被禁用

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:34:06 24 4
gpt4 key购买 nike

<分区>

我试过这个命令:

curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' { "size": 0, "aggs": { "group_by_state": { "terms": { "field": "state" } } } }'

当我执行它时,我总是在 elasticSearch 中得到这个错误:

{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [state] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
}
],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : 0,
"index" : "bank",
"node" : "B8uNFSm7TzO9KS3N72EFPg",
"reason" : {
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [state] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
`enter code here` }
}
]
},
"status" : 400
}enter code here

我该如何解决?

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