OpenSearch syntax to fetch all the distinct values in a field

Viewed 13

How do i extract all the distinct values from a field in opensearch? I am trying get list of all the distinct names using following:

{"find": "terms", "field": "first_name"}

I also want to utilize the same syntax in grafana to create a variable.

0 Answers
Related