How to make analyzed string field visualized?

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?


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.

I can't. Any way to work around?

Great thanks.

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 Function.Promise.try (
at (native)
at (
at callResponseHandlers (
at processQueue (
at Scope.$eval (

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 -