Reputation: 466
I have a problem about my index. Some document of this index cannot be deleted.
I can get the document with :
GET /my_index/my_type/FXN5gs9QRk-xS3ag8RxmZg?routing=12345
but I cannot delete it with:
DELETE /my_index/my_type/FXN5gs9QRk-xS3ag8RxmZg
and with this one too :
DELETE /my_index/my_type/FXN5gs9QRk-xS3ag8RxmZg?routing=12345
When I tried to delete it returns 504 Time Out.
And also I cannot add new document with the same routing.
PS: ElasticSearch Version : 1.4 Doc Count in that type: More than 400,000,000 6 shards and 3 replicas
EDIT :
I cannot even add new document with this routing.
Upvotes: 1
Views: 1089
Reputation: 9721
You need to specify the routing value in the delete too. Once you index documents with a custom routing value, you "take control" of where documents are placed. ES won't know where to find it unless you provide the routing every time:
DELETE /my_index/my_type/FXN5gs9QRk-xS3ag8RxmZg?routing=12345
Although the timeout might be a different issue, since you should simply get a "File Not Found" style exception (or worse, if you haven't made routing required, deleting an unrelated document).
Upvotes: 3