Return a dynamic field depending on value?

Hi!

I just need some guidance in the right direction...

I have an index with a field containing a value from lets say 1 to 10.

Is there a way in the presentation end in Kibana adding a new dynamic field with a word that translates to that number. So giving either Elasticsearch or Kibana a dictionary

For example

1 = Apple
2 = Orange
3 = Banana
and so on

So a search would give something like "fruit_num:2 fruit_name:Orange", with fruit_name being dynamic.

Is this runtime fields or i something else directly in Kibana? If anyone has an example similar to this?

Maybe there are several ways.

You may use format of field in index pattern. This only changes how to display the field. You have to query by original terms.

Of cource you may use runtime mappings to the index in Elasticsearch.

Or you may enrich data while indexing.

Thanks!

Looks promising and what i was looking for!

1 Like

If you satisfied with my post, please check as solution. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.