title: Limiting the number of results of should clauses in Elastic Search
body: <p>I'm writing a query to get results matching one of multiple phrases, like </p>
  
  <pre><code>{
    'size': 10,
    'from': 0,
  
    'query': {
      'bool': {
        'should': [
          {'text': {'title': { 'query': 'some words' }}},
          {'text': {'title': { 'query': 'other words' }}},
          {'text': {'title': { 'query': 'some other words' }}},
        ]
      }
    }
  }
  </code></pre>
  
  <p>It works as expected, but I have a problem : the 10 scored results are all matching the same phrase.</p>
  
  <p>The solution I thought of was to limit the number of results from each <code>should</code> clause to 5 elements for example.</p>
  
  <p>The problem is that I don't see how to implement this using Elastic Search queries, and I don't know if it possible, or if it exists another way to do what I want.</p>
  
  <p>Any ideas ?</p>
  
  <p>Thanks !</p>