title: ElasticSearch Limit Filter Ambiguity
body: <p>I'm a bit unsure about Limit Filter's in ElasticSearch. I dont think Im understanding them correctly. </p>
  
  <p>I am searching multiple shards on multiple nodes of health record information. I want the top lets say 50 highest scored results to my query. </p>
  
  <p>In the <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-limit-filter.html" rel="nofollow noreferrer">docs</a> it says</p>
  
  <blockquote>
    <p>A limit filter limits the number of documents (per shard) to execute
    on.</p>
  </blockquote>
  
  <p>And this <a href="https://stackoverflow.com/questions/8583344/elastic-search-limit-results">SO</a> response states</p>
  
  <pre><code>You should use filters when you don't care about scoring, they are faster and cache-able.
  </code></pre>
  
  <p>But if scoring does matter in my case should I not use Limit Filter to limit my returns to the only the top 50 highest scored results? </p>
  
  <p>Would something like this be more accurate (in java):</p>
  
  <pre><code>SearchResponse response = client.prepareSearch().setSearchType(SearchType.DFS_QUERY_THEN_FETCH).setQuery(qb).setFrom(0).setSize(50).setExplain(true).execute().actionGet();
  </code></pre>
  
  <p><strong>Update</strong>
  I stumbled on this <a href="https://stackoverflow.com/questions/16487548/elasticsearch-using-filterbuilders">SO</a> post where the response states: </p>
  
  <blockquote>
    <p>Right, you should use filters to exclude documents from being even
    considered when executing the query.</p>
  </blockquote>
  
  <p>Okay. So in this case, perhaps I can refine my question to the following:</p>
  
  <p>How do I only return the top 50 scored results? Is the above java reference the correct solution? </p>