# Give more score to documents that contains all query terms

**URL:** <https://discuss.elastic.co/t/give-more-score-to-documents-that-contains-all-query-terms/132593>\
**Category:** Elasticsearch\
**Created:** [May 20, 2018, 12:18pm UTC](https://discuss.elastic.co/t/give-more-score-to-documents-that-contains-all-query-terms/132593 "2018-05-20T12:18:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NarimanN2](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@NarimanN2](https://discuss.elastic.co/u/NarimanN2)\
**Post date:** [May 20, 2018, 12:18pm UTC](https://discuss.elastic.co/t/give-more-score-to-documents-that-contains-all-query-terms/132593/1 "2018-05-20T12:18:39Z")

</div>

I have a problem with scoring in elasticsearch. When user enter a query that contains 3 terms, sometimes a document that has two words a lot, outscores a document that contains all three words. for example if user enters "elasticsearch query tutorial", I want documents that contains all these words score higher than a document with a lot of "tutorial" and "elasticsearch" terms in it.

PS: I am using minimum should match and shingls in my query. also they made ranking a lot better, they did not solve this problem completely. I need something like query coordination in lucene's practical scoring function. is there anything like that in elastic with BM-25?

---

<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:** [June 17, 2018, 12:18pm UTC](https://discuss.elastic.co/t/give-more-score-to-documents-that-contains-all-query-terms/132593/2 "2018-06-17T12:18:49Z")

</div>

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