Santu
(Jose pal)
November 5, 2019, 7:34am
1
Hey,
I am using elasticsearch 5.X version. and i have created an index along with some documents.
POST /_bulk
{ "index" : { "_index" : "index-a", "_type" : "type-a", "_id" : "1" } }
{ "field" : "value1" }
{ "create" : { "_index" : "index-a", "_type" : "type-a", "_id" : "2" } }
and after that i have deleted 1 document from the above index.
DELETE index-a/type-a/2
when i perform http://localhost :xxxx/_cat/indices?v then it returns me docs.deleted count as 0 (zero)
why?. any suggestions on this would be appreciated.
spinscale
(Alexander Reelsen)
November 5, 2019, 9:48am
2
Is it possible that you executed a force merge before testing this?
POST /_bulk
{ "index" : { "_index" : "index-a", "_type" : "type-a", "_id" : "1" } }
{ "field" : "value1" }
{ "create" : { "_index" : "index-a", "_type" : "type-a", "_id" : "2" } }
DELETE index-a/type-a/2
# shows deleted document
GET /_cat/indices/index-a?v
POST index-a/_flush?force
# no more deleted document
GET /_cat/indices/index-a?v
Santu
(Jose pal)
November 5, 2019, 10:12am
3
Thanks @spinscale for response.
No. but still the result is same before and after the force merge.
spinscale
(Alexander Reelsen)
November 5, 2019, 10:17am
4
is there potentially another background process triggering this? Out of curiosity, why do you think this is a problem?
Santu
(Jose pal)
November 5, 2019, 10:50am
5
exactly i'm not very sure if there is any other background process is preventing this from fetching the actual results. but i tested it on my local machine only.
actually i'm expecting some docs deleted count for that index at index level.
Santu
(Jose pal)
November 6, 2019, 7:17am
6
@spinscale , can you also please elaborate what does docs.deleted count means?
spinscale
(Alexander Reelsen)
November 6, 2019, 8:56am
7
docs.deleted
is the count of documents marked as deleted, which will be physically removed from disk at some point in the future when merging happens.
system
(system)
Closed
December 4, 2019, 8:57am
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.