# How to limit the results in a multi match query?

**URL:** <https://discuss.elastic.co/t/how-to-limit-the-results-in-a-multi-match-query/71614>\
**Category:** Elasticsearch\
**Created:** [January 14, 2017, 3:03pm UTC](https://discuss.elastic.co/t/how-to-limit-the-results-in-a-multi-match-query/71614 "2017-01-14T15:03:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emre\_Dogan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emre_dogan/32/14569_2.png) [@Emre\_Dogan](https://discuss.elastic.co/u/Emre_Dogan)\
**Post date:** [January 14, 2017, 3:03pm UTC](https://discuss.elastic.co/t/how-to-limit-the-results-in-a-multi-match-query/71614/1 "2017-01-14T15:03:28Z")

</div>

i had used multi match phrase when I make search. However I have to put limit result of all math phrase seperately. I mean, I want to take only 2 result for each multi match. I can't find any limit/size attributes. Do you know any solution?

Example Code:

```
   "query": {
    "bool": {
      "should": [
         {
          "match_phrase": {
            "text": {
              "query": " Home is clear and big ",
              "slop": 2
         
        }
     }
     },
      {
      "match_phrase": {
        "text": {
          "query": "365 different company use our system in test",
          "slop": 2
      
        }
     }
     }
    
    
  ]
  
}

```

}

---

<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:** [February 11, 2017, 3:03pm UTC](https://discuss.elastic.co/t/how-to-limit-the-results-in-a-multi-match-query/71614/2 "2017-02-11T15:03:34Z")

</div>

Closed on February 11, 2017, 3:03pm UTC

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