I have created fields reading from a txt file, i.e. job_id, as shown in the following figure. However, when I try to make visualization charts on it, there is no way to do it. Are here any ways to work on it?
Thanks.
I have created fields reading from a txt file, i.e. job_id, as shown in the following figure. However, when I try to make visualization charts on it, there is no way to do it. Are here any ways to work on it?
Thanks.
I'm not sure if things have changed, but you can still graph an analyzed field in the Visualization app, it's just a warning.
Can you expand the more info, and also how many unique job ids do you have?
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"Field data loading is forbidden on [job_id]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"logstash-2016.05.05","node":"qNjQTv0iRCeEmB5KURgSew","reason":{"type":"illegal_state_exception","reason":"Field data loading is forbidden on [job_id]"}}]}}
at http://172.16.1.233:5601/bundles/kibana.bundle.js?v=9889:80106:39
at Function.Promise.try (http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:61110:23)
at http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:61079:31
at Array.map (native)
at Function.Promise.map (http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:61078:31)
at callResponseHandlers (http://172.16.1.233:5601/bundles/kibana.bundle.js?v=9889:80078:23)
at http://172.16.1.233:5601/bundles/kibana.bundle.js?v=9889:79583:17
at processQueue (http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:42356:29)
at http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:42372:28
at Scope.$eval (http://172.16.1.233:5601/bundles/commons.bundle.js?v=9889:43600:29)
I am only having 4 job_id
0001, 0002, 0003, 0004
Oh I found a way to work around myself. There is another field called job_id.raw which can do the visualization purpose.
Since you job_id is just number, I think you should have mapped it as not_analyzed string instead of having another job_id.raw field.
This is definitely the better option.
how can I map it as not analyzed string
In the mappings/templates - https://www.elastic.co/guide/en/elasticsearch/guide/master/index-templates.html
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.