首页 > 代码库 > Kibana error " Fielddata is disabled on text fields by default. Set fielddata=http://www.mamicode.com/true on [publisher] ..."

Kibana error " Fielddata is disabled on text fields by default. Set fielddata=http://www.mamicode.com/true on [publisher] ..."

Reason of this error:
Fielddata can consume a lot of heap space, especially when loading high cardinality text fields. Once fielddata has been loaded into the heap, it remains there for the lifetime of the segment.
Also, loading fielddata is an expensive process which can cause users to experience latency hits. This is why fielddata is disabled by default.

Solution:
Exec the command in cmd line:
curl -XPUT http://localhost:9200/index -d ‘{ "mappings": { "type": { "properties": { "publisher": { "type": "text", "fielddata": true }
 } } } } }‘

Kibana error " Fielddata is disabled on text fields by default. Set fielddata=http://www.mamicode.com/true on [publisher] ..."