You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
provides a way to stream <spanclass="strong strong"><strong>all</strong></span> buckets of a specific aggregation similarly to what
620
620
<aclass="link" href="search-request-scroll.html" title="Scroll">scroll</a> does for documents.</p><p>The composite buckets are built from the combinations of the
621
621
values extracted/created for each document and each combination is considered as
622
-
a composite bucket.</p><p>For instance the following document:</p><p>```
623
-
{
622
+
a composite bucket.</p><p>For instance the following document:</p><divclass="pre_wrapper"><preclass="programlisting prettyprint lang-js">{
624
623
"keyword": ["foo", "bar"],
625
624
"number": [23, 65, 76]
626
-
}
627
-
```
628
-
... creates the following composite buckets when <codeclass="literal">keyword</code> and <codeclass="literal">number</code> are used as values source
629
-
for the aggregation:</p><p>```
630
-
{ "keyword": "foo", "number": 23 }
625
+
}</pre></div><p>... creates the following composite buckets when <codeclass="literal">keyword</code> and <codeclass="literal">number</code> are used as values source
626
+
for the aggregation:</p><divclass="pre_wrapper"><preclass="programlisting prettyprint lang-js">{ "keyword": "foo", "number": 23 }
631
627
{ "keyword": "foo", "number": 65 }
632
628
{ "keyword": "foo", "number": 76 }
633
629
{ "keyword": "bar", "number": 23 }
634
630
{ "keyword": "bar", "number": 65 }
635
-
{ "keyword": "bar", "number": 76 }
636
-
```</p><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="_values_source_2"></a>Values source<ahref="https://github.com/elastic/elasticsearch/edit/master/docs/reference/aggregations/bucket/composite-aggregation.asciidoc" class="edit_me" title="Edit this page on GitHub" rel="nofollow">edit</a></h3></div></div></div><p>The <codeclass="literal">values</code> parameter controls the sources that should be used to build the composite buckets.
631
+
{ "keyword": "bar", "number": 76 }</pre></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="_values_source_2"></a>Values source<ahref="https://github.com/elastic/elasticsearch/edit/master/docs/reference/aggregations/bucket/composite-aggregation.asciidoc" class="edit_me" title="Edit this page on GitHub" rel="nofollow">edit</a></h3></div></div></div><p>The <codeclass="literal">values</code> parameter controls the sources that should be used to build the composite buckets.
637
632
There are three different types of values source:</p><divclass="section"><divclass="titlepage"><div><div><h4class="title"><aid="_terms"></a>Terms<ahref="https://github.com/elastic/elasticsearch/edit/master/docs/reference/aggregations/bucket/composite-aggregation.asciidoc" class="edit_me" title="Edit this page on GitHub" rel="nofollow">edit</a></h4></div></div></div><p>The <codeclass="literal">terms</code> value source is equivalent to a simple <codeclass="literal">terms</code> aggregation.
638
633
The values are extracted from a field or a script exactly like the <codeclass="literal">terms</code> aggregation.</p><p>Example:</p><divclass="pre_wrapper"><preclass="programlisting prettyprint lang-js">GET /_search
0 commit comments