# Is there a "standard" way to store result of query into index?

**URL:** <https://discuss.elastic.co/t/is-there-a-standard-way-to-store-result-of-query-into-index/110650>\
**Category:** Elasticsearch\
**Created:** [December 7, 2017, 10:59am UTC](https://discuss.elastic.co/t/is-there-a-standard-way-to-store-result-of-query-into-index/110650 "2017-12-07T10:59:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aarakelyan](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@aarakelyan](https://discuss.elastic.co/u/aarakelyan)\
**Post date:** [December 7, 2017, 10:59am UTC](https://discuss.elastic.co/t/is-there-a-standard-way-to-store-result-of-query-into-index/110650/1 "2017-12-07T10:59:42Z")

</div>

1. just storing result of search query in index
2. store result of aggregation (specially pipeline) query in index.
3. Is any way to filter aggregated results based on some conditions into index

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [December 15, 2017, 9:12am UTC](https://discuss.elastic.co/t/is-there-a-standard-way-to-store-result-of-query-into-index/110650/2 "2017-12-15T09:12:16Z")

</div>

> [@aarakelyan](#):
>
> 1. just storing result of search query in index
> 2. store result of aggregation (specially pipeline) query in index.

You would normally do that on the client side by a separate request.

> [@aarakelyan](#):
>
> Is any way to filter aggregated results based on some conditions into index

I'm now exaxtly sure what is the ask here but maybe [pipeline aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-pipeline.html), more specifically the [bucket selector aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/search-aggregations-pipeline-bucket-selector-aggregation.html) can help here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2018, 9:12am UTC](https://discuss.elastic.co/t/is-there-a-standard-way-to-store-result-of-query-into-index/110650/3 "2018-01-12T09:12:47Z")

</div>

Closed on January 12, 2018, 9:12am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
