Searching trought multi_field type fields

Hi all,

I added a field called ACT_DEPARTMENT in my Elasticsearch index.
The field may contains values like "foo", "bar", "foo bar".
I want to be abble to search "foo", and I want to be abble to display "foo bar" in my results tab or chart as a field values as well.

I use the following mapping definition :

"ACT_DEPARTMENT" : { "type" : "multi_field", "fields" : { "INDEXED": {"type": "string"}, "ORIGINAL": {"type" : "string", "index" : "not_analyzed"} } }

In Kibana Discovery tab I can't filter my results on "foo bar" value. I checked "Hide Missing Fields" option and picked ACT_DEPARTMENT.ORIGINAL and ACT_DEPARTMENT.INDEXED fields but both display a message when I expand them :

> This field is present in your elasticsearch mapping but not in any documents in the search results. You may still be able to visualize or search on it.

A third field called ACT_DEPARTMENT is also available but I can't use it to filter my datas. The + and - icons are unavailable.

Could you please help me to solve my problem?

I used a different mapping as said in documentation :

"ACT_DEPARTEMENT" : { "type" : "string", "fields" : { "RAW": {"type" : "string", "index" : "not_analyzed"} } },

Now I'm abble to do a fulltext search on the field and use it to aggregate.

1 Like

Thanks for posting the resolution!