Полевые данные отключены в текстовых полях по умолчанию kibana

Полевые данные отключены в текстовых полях по умолчанию.

Привет,

Недавно в моей настройке elasticsearch произошло что-то странное. Индекс Metricbeat был заменен новым именем, как и старое, например, metricbeat.x.date, но теперь индекс отображается как metricbeat. Версия и при попытке визуализировать. Я получаю следующую ошибку.

Ошибка:

[esaggs] > Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] 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":"metricbeat-7.2.1","node":"iD4ffU_sR2-uLU_SP01Ukw","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] 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."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] 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.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [host.name] 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."}}},"status":400}

Пробные решения:

Предоставлено следующее в консоли.

PUT my_index/_doc/host.name.keyword
{
"properties": {
"my_field": {
"type": "text",
"fielddata": true
}
}
}

#output:#
{
"_index" : "my_index",
"_type" : "_doc",
"_id" : "host.name",
"_version" : 1,
"_seq_no" : 0,
"_primary_term" : 1,
"found" : true,
"_source" : {
"properties" : {
"my_field" : {
"type" : "text",
"fielddata" : true
}
}
}
}

А также

PUT my_index/_doc/host.name
{
"properties": {
"my_field": {
"type": "text",
"fielddata": true
}
}
}

Output:
{
"_index" : "my_index",
"_type" : "_doc",
"_id" : "host.name",
"_version" : 2,
"result" : "updated",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 2,
"_primary_term" : 2
}

Может ли кто-нибудь помочь мне в моей проблеме.


person sai kumar    schedule 17.12.2019    source источник
comment
Это поможет вам stackoverflow.com/questions/58733898/   -  person Assael Azran    schedule 17.12.2019