# How to get not too much similar documents?

**URL:** <https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788>\
**Category:** Elasticsearch\
**Created:** [October 22, 2017, 4:25am UTC](https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788 "2017-10-22T04:25:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)\
**Post date:** [October 22, 2017, 4:25am UTC](https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788/1 "2017-10-22T04:25:46Z")

</div>

I have a requirement to retrieve similar documents, but not too much similar (because we have in database many almost identical documents, which we want to skip in search).

I looking into "More Like This" documentation, and I can't find something to limit similarity rating. How I can achieve that (e.g. finding similar documents, but not too much similar? I would like to have max similarity of 80%)?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 23, 2017, 8:37am UTC](https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788/2 "2017-10-23T08:37:41Z")

</div>

Not sure about your requirement, but maybe the `max_doc_freq` parameter might help you a little bit, though it was supposed to filter out stopwords mainly.

---

<div class="post-metadata">

**Author:** ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)\
**Post date:** [November 17, 2017, 10:32am UTC](https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788/3 "2017-11-17T10:32:24Z")

</div>

Actually "MaxQueryTerms" seems to give me what I need. Thanks anyway!

---

<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:** [December 15, 2017, 10:32am UTC](https://discuss.elastic.co/t/how-to-get-not-too-much-similar-documents/104788/4 "2017-12-15T10:32:33Z")

</div>

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