# Our production elasticSearch index gets dropped every week by mistake

**URL:** <https://discuss.elastic.co/t/our-production-elasticsearch-index-gets-dropped-every-week-by-mistake/131798>\
**Category:** Elasticsearch\
**Created:** [May 14, 2018, 5:50pm UTC](https://discuss.elastic.co/t/our-production-elasticsearch-index-gets-dropped-every-week-by-mistake/131798 "2018-05-14T17:50:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avboivin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avboivin/32/30945_2.png) [@avboivin](https://discuss.elastic.co/u/avboivin)\
**Post date:** [May 14, 2018, 5:50pm UTC](https://discuss.elastic.co/t/our-production-elasticsearch-index-gets-dropped-every-week-by-mistake/131798/1 "2018-05-14T17:50:11Z")

</div>

For the past 2 mondays, I come in the office and our main elasticsearch index has been dropped and recreated during the weekend.

We "sync" our ES instance from SqlServer using code which has been written 2-3 years ago and has worked up to now.

This code seems to be the only culprit as of now, part of it looks up if any documents are missing in the database and deletes them in elasticsearch. This line of ColdFusion code will build the delete http command to send and deletes an ES document.

`UrlToCall = "#SearchEndPoint#/#SearchIndex#/#SearchIndexType#/#item.itemid#-#item.itemtype#-#merchants.id#-#item.dealerid#"`

What I'm thinking is this piece of code could have a null value within one of it's variables which could lead to an entire index getting dropped.

E.G. instead of calling  
`DELETE 10.11.12.13:9200/bunch-of-products/product/414-1-2323-0`

it would call  
`DELETE 10.11.12.13:9200/bunch-of-products/ / - -`

I've tried a lot of different syntaxes and while I think this could have hapenned I just can't find the actual syntax that's required for this query to drop the index.  
( obviously I know `DELETE 10.11.12.13:9200/bunch-of-products/` would drop it )

---

<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 11, 2018, 5:50pm UTC](https://discuss.elastic.co/t/our-production-elasticsearch-index-gets-dropped-every-week-by-mistake/131798/2 "2018-06-11T17:50:15Z")

</div>

Closed on June 11, 2018, 5:50pm UTC

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