title: the uniq gender returns only 10 values. whereas I need all the unique values
body: <p>Problem statement: I require list of unique values of metric <strong>host.name.keyword</strong> from the complete index. Currently, I am using the below query which gives only 10 values but there are more values existing in the index.</p>
  <p>Query:</p>
  <pre><code>GET nw-metricbeats-7.10.0-2021.07.16/_search
  {
    &quot;size&quot;:&quot;0&quot;,
    &quot;aggs&quot; :
    {
      &quot;uniq_gender&quot; : 
      {
        &quot;terms&quot; : 
        { 
          &quot;field&quot; : &quot;host.name.keyword&quot; 
          
        }
      }
    }
  }
  </code></pre>
  <p>currently, it returns only 10 values like below:</p>
  <pre><code>{
    &quot;took&quot; : 68,
    &quot;timed_out&quot; : false,
    &quot;_shards&quot; : {
      &quot;total&quot; : 1,
      &quot;successful&quot; : 1,
      &quot;skipped&quot; : 0,
      &quot;failed&quot; : 0
    },
    &quot;hits&quot; : {
      &quot;total&quot; : {
        &quot;value&quot; : 10000,
        &quot;relation&quot; : &quot;gte&quot;
      },
      &quot;max_score&quot; : null,
      &quot;hits&quot; : [ ]
    },
    &quot;aggregations&quot; : {
      &quot;uniq_gender&quot; : {
        &quot;doc_count_error_upper_bound&quot; : 0,
        &quot;sum_other_doc_count&quot; : 1011615,
        &quot;buckets&quot; : [
          {
            &quot;key&quot; : &quot;service1&quot;,
            &quot;doc_count&quot; : 303710
          },
          {
            &quot;key&quot; : &quot;service2&quot;,
            &quot;doc_count&quot; : 155110
          },
          {
            &quot;key&quot; : &quot;service3&quot;,
            &quot;doc_count&quot; : 154074
          },
          {
            &quot;key&quot; : &quot;service4&quot;,
            &quot;doc_count&quot; : 148499
          },
          {
            &quot;key&quot; : &quot;service5&quot;,
            &quot;doc_count&quot; : 145033
          },
          {
            &quot;key&quot; : &quot;service6&quot;,
            &quot;doc_count&quot; : 144226
          },
          {
            &quot;key&quot; : &quot;service7&quot;,
            &quot;doc_count&quot; : 139367
          },
          {
            &quot;key&quot; : &quot;service8&quot;,
            &quot;doc_count&quot; : 137063
          },
          {
            &quot;key&quot; : &quot;service9&quot;,
            &quot;doc_count&quot; : 135586
          },
          {
            &quot;key&quot; : &quot;service10&quot;,
            &quot;doc_count&quot; : 134794
          }
        ]
      }
    }
  }
  </code></pre>
  <p>can someone help me with the query which can return N number of unique values from the metrics ??</p>