I generated 2 documents with the following curl command:
curl -XPOST 'http://PICDSM020001125.intranet.barcapint.com:9200/stuckthreads/detail?pretty' -d '
{
"date":"2016-09-09T14:00:00",
"environment":"UAT3",
"slotCount":1,
"slotAverage":292,
"maxCount":0,
"maxAverage":0
}'
curl -XPOST 'http://PICDSM020001125.intranet.barcapint.com:9200/stuckthreads/detail?pretty' -d '
{
"date":"2016-09-09T14:00:00",
"environment":"STAGE",
"slotCount":1,
"slotAverage":352,
"maxCount":0,
"maxAverage":0
}'
I then deleted the first document with the following command:
curl -XDELETE 'http://PICDSM020001125.intranet.barcapint.com:9200/stuckthreads/_query' -d '
{
"query" : {
"term" : {
"date" : "2016-09-09T14:00:00",
"environment":"UAT3"
}
}
}'
but both the documents got deleted. Is there something I am doing wrong?