anchor.diff:  
   This shows an error value for each term returned by the aggregation which represents the 'worst case' error in the document count
   and can be useful when deciding on a value for the `shard_size` parameter. This is calculated by summing the document counts for
  -the last term returned by all shards which did not return the term. In the example above the error in the document count for Product C
  -would be 15 as Shard B was the only shard not to return the term and the document count of the last term it did return was 15.
  -The actual document count of Product C was 54 so the document count was only actually off by 4 even though the worst case was that
  -it would be off by 15. Product A, however has an error of 0 for its document count, since every shard returned it we can be confident
  -that the count returned is accurate.
  -
  -[source,console-result]
  ---------------------------------------------------
  -{
  -    ...
  -    "aggregations" : {
  -        "products" : {
  -            "doc_count_error_upper_bound" : 46,
  -            "sum_other_doc_count" : 79,
  -            "buckets" : [
  -                {
  -                    "key" : "Product A",
  -                    "doc_count" : 100,
  -                    "doc_count_error_upper_bound" : 0
  -                },
  -                {
  -                    "key" : "Product Z",
  -                    "doc_count" : 52,
  -                    "doc_count_error_upper_bound" : 2
  -                }
  -                ...
  -            ]
  -        }
  -    }
  -}
  ---------------------------------------------------
  -// TESTRESPONSE[s/\.\.\.//]
  -// TESTRESPONSE[s/: (\-)?[0-9]+/: $body.$_path/]
  +the last term returned by all shards which did not return the term.
   
   These errors can only be calculated in this way when the terms are ordered by descending document count. When the aggregation is
   ordered by the terms values themselves (either ascending or descending) there is no error in the document count since if a shard
  
positive.code: 
  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,console-result]
  --------------------------------------------------
  {
      ...
      "aggregations" : {
          "products" : {
              "doc_count_error_upper_bound" : 46,
              "sum_other_doc_count" : 79,
              "buckets" : [
                  {
                      "key" : "Product A",
                      "doc_count" : 100
                  },
                  {
                      "key" : "Product Z",
                      "doc_count" : 52
                  }
                  ...
              ]
          }
      }
  }
  --------------------------------------------------
  // TESTRESPONSE[s/\.\.\.//]
  // TESTRESPONSE[s/: (\-)?[0-9]+/: $body.$_path/]
  
  ==== Per bucket document count error
  
  
negative.code: 
  ===== Filtering Values with partitions
  
  Sometimes there are too many unique terms to process in a single request/response pair so
  it can be useful to break the analysis up into multiple requests.
  This can be achieved by grouping the field's values into a number of partitions at query-time and processing
  only one partition in each request.
  