# Result in exact order

**URL:** <https://discuss.elastic.co/t/result-in-exact-order/65036>\
**Category:** Elasticsearch\
**Created:** [November 4, 2016, 5:52pm UTC](https://discuss.elastic.co/t/result-in-exact-order/65036 "2016-11-04T17:52:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arul\_Sudarsanam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arul_sudarsanam/32/12980_2.png) [@Arul\_Sudarsanam](https://discuss.elastic.co/u/Arul_Sudarsanam)\
**Post date:** [November 4, 2016, 5:52pm UTC](https://discuss.elastic.co/t/result-in-exact-order/65036/1 "2016-11-04T17:52:45Z")

</div>

Hi,

I have some issues when fetching the results.

I want the result to be order exact as i give

```auto
{
    "query": {
        "bool": {
            "should": [{
                "match": {
                    "movie_id": "127"
                }
            }, {
                "match": {
                    "movie_id": "111"
                }
            }, {
                "match": {
                    "movie_id": "131"
                }
            }, {
                "match": {
                    "movie_id": "106"
                }
            }]
        }
    }
}

```

i want it to be order in that exact order, but i am getting it in asc order even though i havent given any sort

i want it in the order 124,111,131,106

what is that i am missing

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 4, 2016, 7:40pm UTC](https://discuss.elastic.co/t/result-in-exact-order/65036/2 "2016-11-04T19:40:28Z")

</div>

> [@Arul\_Sudarsanam](#):
>
> what is that i am missing

Right now you are asking for all four documents in order sorted by score but your query doesn't provide useful scores. If you had a full text query in there then you'd get a useful score. You could try `boost` to get them in a particular order:

```auto
{
    "query": {
        "bool": {
            "should": [{
                "match": {
                    "movie_id": "127", "boost": 4
                }
            }, {
                "match": {
                    "movie_id": "111", "boost": 3
                }
            }, {
                "match": {
                    "movie_id": "131", "boost": 2
                }
            }, {
                "match": {
                    "movie_id": "106", "boost": 1
                }
            }]
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![Arul\_Sudarsanam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arul_sudarsanam/32/12980_2.png) [@Arul\_Sudarsanam](https://discuss.elastic.co/u/Arul_Sudarsanam)\
**Post date:** [November 7, 2016, 1:12pm UTC](https://discuss.elastic.co/t/result-in-exact-order/65036/3 "2016-11-07T13:12:34Z")

</div>

hi, thanks for your reply,

but when i give boost, i am not fetching any result at all.. can you tell me how can i use score to get my desired result.

---

<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:** [July 5, 2017, 10:06pm UTC](https://discuss.elastic.co/t/result-in-exact-order/65036/4 "2017-07-05T22:06:14Z")

</div>


