How to limit the results in a multi match query?


(Emre Doğan) #1

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
      
        }
     }
     }
    
    
  ]
  
}

}


(system) #2

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