Get all values for a given field?

Is it possible to query for all of the values a specific field?

Say I have "articles" and each article has an author, is there a query I can perform to find a list of all authors?

Take a look at the terms aggregation. By default, it returns you the 10 most common values for a field. You can provide a size parameter to get more values than just the top 10 values.

If you would like to retrieve all the values, rather than just the top X most common values, then you can wrap the terms aggregation in a composite aggregation.

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