Request for Assistance in Extracting Fields and corresponding values from Elasticsearch

Hi,

I am looking to extract all available fields from my Elasticsearch index along with their possible values. I have more than 500 fields to extract.

My goal is to create a comprehensive table where:

  • Each column represents a different field, with the field name displayed at the top.
  • Each column contains all possible values associated with that field.

Could you please provide guidance on how to achieve this in Kibana or suggest any best practices for visualizing this data effectively? Given that I don't have access to the Dev tools. (Only Analytics: Discover/Dashboard/Canvas)

Thank you!

Hi @elastic_interogation,

Welcome! To confirm, you don't have access to DevTools? The easiest way is to use the _mapping API using either DevTools or via a cURL command in the terminal to extract the column names:

curl -X GET "localhost:9200/my-index-000001/_mapping?pretty"

To get all possible values you could write a script to get all fields using mapping and then use a simple terms aggregation specifing the size parameter, but you would need to eb mindful of the buckets limit.

Hope that helps!