# Best way to save queries

**URL:** https://discuss.elastic.co/t/best-way-to-save-queries/239863
**Category:** Elasticsearch
**Created:** [July 3, 2020, 11:07pm UTC](https://discuss.elastic.co/t/best-way-to-save-queries/239863 "2020-07-03T23:07:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NikolaP93](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@NikolaP93](https://discuss.elastic.co/u/NikolaP93)
#### Post date: [July 3, 2020, 11:07pm UTC](https://discuss.elastic.co/t/best-way-to-save-queries/239863/1 "2020-07-03T23:07:36Z")

</div>

Hi, I am using Reactivebase to query elasticsearch. Since the users of my app will be able to save the queries, is it reliable for me to store the query as it is returned? Example:

`{"query":{"bool":{"must":[{"bool":{"must":{"bool":{"should":[{"multi_match":{"query":"fdsfsdfs","fields":["title"],"type":"best_fields","operator":"or","fuzziness":0}},{"multi_match":{"query":"coffee","fields":["title"],"type":"phrase","operator":"or"}}],"minimum_should_match":"1"}}}}]}},"size":10}`

Right now it's doing it's job. However I am concerned that maybe sometime in the future the query might change on Elastic, will this always be the default query value? If my user saves his query like so, can I expect it to not change with future versions?

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [July 5, 2020, 2:21pm UTC](https://discuss.elastic.co/t/best-way-to-save-queries/239863/2 "2020-07-05T14:21:44Z")

</div>

The meaning of the Jain you send might change on a major version upgrade but it is u likely to change much if at all. We typically start sending back http Warning headers if you use syntax that will change in the next major.

---

<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: [August 2, 2020, 2:21pm UTC](https://discuss.elastic.co/t/best-way-to-save-queries/239863/3 "2020-08-02T14:21:47Z")

</div>

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