# Guaranteed higher scores from one should query over another

**URL:** <https://discuss.elastic.co/t/guaranteed-higher-scores-from-one-should-query-over-another/352728>\
**Category:** Elasticsearch\
**Created:** [February 7, 2024, 10:10am UTC](https://discuss.elastic.co/t/guaranteed-higher-scores-from-one-should-query-over-another/352728 "2024-02-07T10:10:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy\_j](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andy\_j](https://discuss.elastic.co/u/andy_j)\
**Post date:** [February 7, 2024, 10:10am UTC](https://discuss.elastic.co/t/guaranteed-higher-scores-from-one-should-query-over-another/352728/1 "2024-02-07T10:10:41Z")

</div>

I have a Elasticsearch query with three _should queries_ of declining importance. How can I assert that documents returned from each _should query_ has higher score than those of less importance?

Maybe this could be solved by using some scoring boundary, so that _should query #1_ documents are forced into the score interval 30-20, _query #2_ into 20-10 and _query #3_ into 10-0.

I know I can work with simple boosting, but I think this does not guarantee that results wouldn't "intrude" on other querys' results.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 7, 2024, 11:07am UTC](https://discuss.elastic.co/t/guaranteed-higher-scores-from-one-should-query-over-another/352728/2 "2024-02-07T11:07:43Z")

</div>

Boosting is generally the way to go. The only other way I can think of is to break the query down into 3 separate queries and send these in parallel using the [multi search API](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/search-multi-search.html), which allows you to control how results are ordered/combined within your application.

---

<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:** [March 6, 2024, 11:08am UTC](https://discuss.elastic.co/t/guaranteed-higher-scores-from-one-should-query-over-another/352728/3 "2024-03-06T11:08:09Z")

</div>

Closed on March 6, 2024, 11:08am UTC

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