Elasticsearch delete api only deletes the record from one shard. The record still can be searched unless I manually delete & rebuild the whole index.
Following is the response of Delete API:
{"found":false,"_index":"companyindex","_type":"companydata","_id":"932","_version":1,"_shards":{"total":2,"successful":1,"failed":0}}
The issue was in document id. Actually, we were outputting user_id as document_id. So the company_id was never going to be found. Hence we got {"found : false} in the cURL response.
Sorry to say, question text also needs little bit modification. Record was never deleted from 1 shard (after correcting myself, record exists on only node irrespective of how many shards it has)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.