Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ <h2 class="page-title">Guide template</h2>
"value": 450.0
}
}
}</pre></div><p>The name of the aggregation (<code class="literal">intraday_return</code> above) also serves as the key by which the aggregation result can be retrieved from the returned response.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_script_9"></a>Script<a href="https://github.com/elastic/elasticsearch/edit/6.2/docs/reference/aggregations/metrics/sum-aggregation.asciidoc" class="edit_me" title="Edit this page on GitHub" rel="nofollow">edit</a></h3></div></div></div><p>We could also use a script to fetch the sales price:</p><div class="pre_wrapper"><pre class="programlisting prettyprint lang-js">POST /sales/_search?size=0
}</pre></div><p>The name of the aggregation (<code class="literal">hat_prices</code> above) also serves as the key by which the aggregation result can be retrieved from the returned response.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_script_9"></a>Script<a href="https://github.com/elastic/elasticsearch/edit/6.2/docs/reference/aggregations/metrics/sum-aggregation.asciidoc" class="edit_me" title="Edit this page on GitHub" rel="nofollow">edit</a></h3></div></div></div><p>We could also use a script to fetch the sales price:</p><div class="pre_wrapper"><pre class="programlisting prettyprint lang-js">POST /sales/_search?size=0
{
"query" : {
"constant_score" : {
Expand Down