Visualizing certain elements in an Array field

Hi there,

This is a naive question but I have a field called "tools_usage" that holds some Array data:

e.g

tools_record = [
   "toolname:banana",
   "toolcategory:fruit",
   "success:true",
]
self.es.index(index="my_index", document={"tools_usage" : tools_record})

I now want to create a "Horizontal Bar" visualization to only display toolname value on the vertical axis and count of records on the horizontal axis.

What should I do under the vertical axis options to achieve this? I tried Filters but couldn't get it to work.

Any help is appreciated.

-H

Hi @hs121

I think the best route here is to use a runtime field: extract the toolname value for the field with the multi-value (array) and emit( stringValue ).
Then use the new created runtime field to build a visualization.

Thanks @Marco_Liberati I will look into runtime field today.

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