# All (non-redundant) values of a list of fields

**URL:** <https://discuss.elastic.co/t/all-non-redundant-values-of-a-list-of-fields/242743>\
**Category:** Elasticsearch\
**Created:** [July 27, 2020, 12:15pm UTC](https://discuss.elastic.co/t/all-non-redundant-values-of-a-list-of-fields/242743 "2020-07-27T12:15:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florent\_Fauvin](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@Florent\_Fauvin](https://discuss.elastic.co/u/Florent_Fauvin)\
**Post date:** [July 27, 2020, 12:15pm UTC](https://discuss.elastic.co/t/all-non-redundant-values-of-a-list-of-fields/242743/1 "2020-07-27T12:15:43Z")

</div>

Hello,

I would like to know which Elastic query can give me all (non-redundant) values ​​of a list of fields.

For example, I would like to know all the possible values ​​contained in field: User, SubjectUser, UserName?

(I found how to do it on Splunk but not with Elastic: - /)

Thank you very much for your help,

Florent

---

<div class="post-metadata">

**Author:** ![fgjensen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fgjensen/32/62320_2.png) [@fgjensen](https://discuss.elastic.co/u/fgjensen)\
**Post date:** [July 27, 2020, 8:07pm UTC](https://discuss.elastic.co/t/all-non-redundant-values-of-a-list-of-fields/242743/2 "2020-07-27T20:07:19Z")

</div>

Hi Florent\_Fauvin

If the fields are of type keyword you can use a terms aggregation for this purpose. Please, take a look at the documentation here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html)

Best regards  
Flemming G. Jensen

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 24, 2020, 8:07pm UTC](https://discuss.elastic.co/t/all-non-redundant-values-of-a-list-of-fields/242743/3 "2020-08-24T20:07:20Z")

</div>

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