Elasticsearch

can someone help me please ? i try to set fileddata to true but its failed.

{
"took": 26,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 1,
"skipped": 1,
"failed": 1,
"failures": [
{
"shard": 0,
"index": "metricbeat-2020.08.18",
"node": "NMIiS4rmTO21i_rUUjo3lw",
"reason": {
"type": "illegal_argument_exception",
"reason": "Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [host.name] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
}
}
]
},
"hits": {
"total": 0,
"max_score": 0,
"hits":
}
}

i try whit this this commande but it doesn't work.

curl -PUT http://XXXX:9200/metricbeat-2020.08.18/_mapping
{
"properties": {
"yourfield": {
"type": "text",
"fielddata": true
}
}
}

you can see the url:Text type family | Elasticsearch Guide [8.11] | Elastic


1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.