title: Elasticsearch filter by unique value
body: <p>i would like to get only results which have a unique value for a field how can i do it ? </p>
  
  <p>I can count it with </p>
  
  <pre><code>$params ['body'] ['aggs']['test_count'] = array(
              "cardinality" =&gt; array(
              "field" =&gt; "id",
              "precision_threshold"=&gt; 00
          )
  
      );
  </code></pre>
  
  <p>but the results still appear how can i set a filter to get only value have a distinct id ? </p>