anchor.diff:           back by increasing `shard_size`.
            Setting `shard_min_doc_count` too high will cause terms to be filtered out on a shard level. This value should be set much lower than `min_doc_count/#shards`.
   
  +[[search-aggregations-bucket-terms-aggregation-script]]
   ==== Script
   
   Generating the terms using a script:
  
positive.code: 
  ==== Document counts are approximate
  
  As described above, the document counts (and the results of any sub aggregations) in the terms aggregation are not always 
  accurate.  This is because each shard provides its own view of what the ordered list of terms should be and these are 
  combined to give a final view. Consider the following scenario:
  
  A request is made to obtain the top 5 terms in the field product, ordered by descending document count from an index with 
  3 shards. In this case each shard is asked to give its top 5 terms. 
  
  [source,js]
  --------------------------------------------------
  {
      "aggs" : {
          "products" : {
              "terms" : { 
                  "field" : "product",
                  "size" : 5
              }
  
negative.code: 
  ==== Calculating Document Count Error
  
  coming[1.4.0]
  
  There are two error values which can be shown on the terms aggregation.  The first gives a value for the aggregation as
  a whole which represents the maximum potential document count for a term which did not make it into the final list of
  terms. This is calculated as the sum of the document count from the last term returned from each shard .For the example
  given above the value would be 46 (2 + 15 + 29). This means that in the worst case scenario a term which was not returned
  could have the 4th highest document count.
  
  [source,js]
  