title: elastic search limit results for types
body: <p>i have the following query</p>
  
  <pre><code>$queryDefinition = [
          'query' =&gt; [
              'bool' =&gt; [
                  'must' =&gt; [
                      [
                          'query_string' =&gt; [
                              'default_field' =&gt; '_all',
                              'query' =&gt; $term
                          ]
                      ]
                  ],
                  'must_not' =&gt; [],
                  'should' =&gt; []
              ],
          ],
          //'filter' =&gt; [
          //    'limit' =&gt; ['value' =&gt; 3],
          //],
          'from' =&gt; 0,
          'size' =&gt; 50,
          'sort' =&gt; [],
          'facets' =&gt; [
              'types' =&gt; [
                      'terms' =&gt; ['field' =&gt; '_type']
                  ]
              ]
      ];
  </code></pre>
  
  <p>in the index we have 5 types, and i would like to show only 3 results from each type, for autocomplete. when i set the filter limit only the results from the first type are filtered, for other types i get all the results.</p>
  
  <p>how can i do this?</p>
  
  <p>thanks</p>