# How to remove duplicate values in ealstic search

**URL:** <https://discuss.elastic.co/t/how-to-remove-duplicate-values-in-ealstic-search/112226>\
**Category:** Elasticsearch\
**Created:** [December 18, 2017, 12:16pm UTC](https://discuss.elastic.co/t/how-to-remove-duplicate-values-in-ealstic-search/112226 "2017-12-18T12:16:31Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 19, 2017, 7:53am UTC](https://discuss.elastic.co/t/how-to-remove-duplicate-values-in-ealstic-search/112226/16 "2017-12-19T07:53:22Z")

</div>

- min aggregation: [Min Aggregation | Elasticsearch Reference [6.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-metrics-min-aggregation.html)
- exclude from resultset, see `must_not` clause from bool query: [Bool Query | Elasticsearch Reference [6.1] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/query-dsl-bool-query.html)

If you still don't know, please provide a sample data set with some docs that we can use as described in

> [@About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21):
>
> The heart of the free and open Elastic Stack Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease. warning PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST Some useful links: [elasticsearch reference guide](http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)[elasticsearch user guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)[elasticsearch plugins](https://www.elastic.co/guide/en/elasticsearch/plugins/current/index.html)[elasticsearch cl…](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

It will help to better understand what you are doing.  
Please, try to keep the example as simple as possible.

Please read carefully the instructions. It must be easily runnable.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-remove-duplicate-values-in-ealstic-search/112226)._
