# Combine multiple condition and sort by score

**URL:** <https://discuss.elastic.co/t/combine-multiple-condition-and-sort-by-score/126728>\
**Category:** Elasticsearch\
**Created:** [April 4, 2018, 11:05am UTC](https://discuss.elastic.co/t/combine-multiple-condition-and-sort-by-score/126728 "2018-04-04T11:05:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoangvnit](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@hoangvnit](https://discuss.elastic.co/u/hoangvnit)\
**Post date:** [April 4, 2018, 11:05am UTC](https://discuss.elastic.co/t/combine-multiple-condition-and-sort-by-score/126728/1 "2018-04-04T11:05:49Z")

</div>

When searching document by title and i using sort by **\_score** , the results is good and document matched with search keyword.

But my document have score of its own. and when i using multiple sort ( qualityScore first and \_score of elastics second ) . the results show qualityScore high first but title matched with search keyword not good.

how can i combine \_score more than one condition?

Anyone have a idea please help me.  
Thank advance.

This is my query

```
GET member-recipes/_search
{
  "sort": [
    {
      "qualityScore": {
        "order": "desc"
      }
    },
    "_score"
  ],
    "query": {
      "bool": { 
       "must": [
          { "match": {"title": "21-Day-Fix-Instant-Pot-Chicken-Marsala-Stove-top-896247"}}
        ]
      }
    }
}
```

---

<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:** [May 2, 2018, 11:06am UTC](https://discuss.elastic.co/t/combine-multiple-condition-and-sort-by-score/126728/2 "2018-05-02T11:06:02Z")

</div>

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