# How to blow a query when elasticsearch first runs?

**URL:** <https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534>\
**Category:** Elasticsearch\
**Created:** [May 24, 2019, 12:29am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534 "2019-05-24T00:29:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xodn0812](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xodn0812](https://discuss.elastic.co/u/xodn0812)\
**Post date:** [May 24, 2019, 12:29am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534/1 "2019-05-24T00:29:09Z")

</div>

How to blow a query when elasticsearch first runs???

I need to automatically register policies, templates, security, etc. when elasticsearch is first run.  
I do not think there is a function that can do it automatically in the first operation. What do you usually do?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 24, 2019, 5:19am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534/2 "2019-05-24T05:19:59Z")

</div>

Is it for test purposes?  
What kind of queries do you want to block? Queries ran by your application? Or ran by any user on the command line?

May be you can create an account with a wrong password and once everything is set, change the user password to the right one so he can authenticate on the system?

---

<div class="post-metadata">

**Author:** ![xodn0812](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xodn0812](https://discuss.elastic.co/u/xodn0812)\
**Post date:** [May 24, 2019, 6:03am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534/3 "2019-05-24T06:03:30Z")

</div>

I want to use it in a container environment.  
i want the es container to be created for the first time and to automatically make those settings.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 24, 2019, 7:35am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534/4 "2019-05-24T07:35:34Z")

</div>

Is that for test purpose or for production?

I mean that if it's for production purpose, I guess that the disks are persistent and that all those steps need to be done only once.

Could you describe the use case?

---

<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:** [June 21, 2019, 7:35am UTC](https://discuss.elastic.co/t/how-to-blow-a-query-when-elasticsearch-first-runs/182534/5 "2019-06-21T07:35:35Z")

</div>

Closed on June 21, 2019, 7:35am UTC

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