Delete with an empty id could be dangerous
@olivere just ran into an issue and thought to alert you guys. unless i am mistaken, there isn't a check for an empty id when performing index operations. This might be fine in most cases, as ES would error out, but when an id is empty and u can perform a delete call like so -
client.Delete().Index(index).Type(mtype).Id(id).Do()
the entire index is wiped out. quite dangerous. i have added checks in my code now, but if it makes sense to do it at lib level, we might save someone some grief..
its the difference between -
curl -XDELETE localhost:9200/someindex/type/
vs
curl -XDELETE localhost:9200/someindex/type/1
Yes, that makes sense. I'll add checks (as ES does as well).
:thumbsup: