elasticsearch data lost when running nodejs script : <p>i have an elasticsearch running on my localmachine (only there, no other shards/replicas), and it took me awhile but i got to a state where i had all my data (~9 million documents) on it.
then, i wrote a small nodejs script that went throw all the documents in the index and if a certain field had a hyphen '-' in it i changed it to be a space instead, and add the document to a list of documents i wanted to update. and then i've sended there docs to update using bulk update
notice, from the 9 million record, most of them whould not have had this condition met and would not have tried to update.</p>

<p>after this script ren a few hours, i was amazed to find only 146 docs are left in my index,when i run:<a href="http://localhost:9200/_cat/indices?v" rel="nofollow noreferrer">http://localhost:9200/_cat/indices?v</a>
i get:</p>

<p>health status index       pri rep docs.count docs.deleted store.size pri.store.size 
yellow open   persons       5   1        146          137    202.4kb        202.4kb 
yellow open   please_read   5   1          1            0      4.9kb          4.9kb </p>

<p>and i can see the size of the elasticseach data folder is too small to have the original data hiding there somhow..</p>

<p>needless to say i have no snapshot to restore from..</p>

<p>i'll add the script i ran+the es logs, and i'll be very very happy if anyone can find a way to restore the data, or at the least tell me what happend..</p>

<p><a href="https://drive.google.com/drive/folders/0B9CrlDDC98YQSXQyaFhLb0VWY0U?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/drive/folders/0B9CrlDDC98YQSXQyaFhLb0VWY0U?usp=sharing</a></p>
