Documents deletion in shards


(Itay Bittan) #1

I have initial index with 5,655,272 documents, divided to 4 shards.
My python module deletes most of the documents and leave ~1.4M (out of 5.6M).
Then I also run "merge segments" to improve index serving time.
Now if I run
GET /s_8766822_1532083664603/_count
I'm getting:
{
"count": 1413818,
"_shards": {
"total": 4,
"successful": 4,
"failed": 0
}
}
as expected.
But If I run:
GET /s_8766822_1532083664603/_status
it looks like the total num_docs of all shards are 5,655,272 (the initial size, before deletion). deleted_docs is 0 in all shards.

What do I miss here? each shard should have quarter of 1,413,818 no? (put here 2 out of 4 shards output because of text limit):
{
"_shards": {
"total": 20,
"successful": 20,
"failed": 0
},
"indices": {
"s_8766822_1532083664603": {
"index": {
"primary_size_in_bytes": 2352080843,
"size_in_bytes": 11760404359
},
"translog": {
"operations": 0
},
"docs": {
"num_docs": 5655272,
"max_doc": 5655272,
"deleted_docs": 0
},
"merges": {
"current": 0,
"current_docs": 0,
"current_size_in_bytes": 0,
"total": 0,
"total_time_in_millis": 0,
"total_docs": 0,
"total_size_in_bytes": 0
},
"refresh": {
"total": 0,
"total_time_in_millis": 0
},
"flush": {
"total": 0,
"total_time_in_millis": 0
},
"shards": {
"0": [
{
"routing": {
"state": "STARTED",
"primary": true,
"node": "X5-CaxyYT2acVXuaibIarA",
"relocating_node": null,
"shard": 0,
"index": "s_8766822_1532083664603"
},
"state": "STARTED",
"index": {
"size_in_bytes": 590843614
},
"translog": {
"id": 1532083755595,
"operations": 0
},
"docs": {
"num_docs": 1414952,
"max_doc": 1414952,
"deleted_docs": 0
},
"merges": {
"current": 0,
"current_docs": 0,
"current_size_in_bytes": 0,
"total": 0,
"total_time_in_millis": 0,
"total_docs": 0,
"total_size_in_bytes": 0
},
"refresh": {
"total": 0,
"total_time_in_millis": 0
},
"flush": {
"total": 0,
"total_time_in_millis": 0
}
}
],
"1": [
{
"routing": {
"state": "STARTED",
"primary": false,
"node": "l2Rtnz1gQJeWF5A_9OHKBA",
"relocating_node": null,
"shard": 1,
"index": "s_8766822_1532083664603"
},
"state": "STARTED",
"index": {
"size_in_bytes": 588198936
},
"translog": {
"id": 1532083755554,
"operations": 0
},
"docs": {
"num_docs": 1413552,
"max_doc": 1413552,
"deleted_docs": 0
},
"merges": {
"current": 0,
"current_docs": 0,
"current_size_in_bytes": 0,
"total": 0,
"total_time_in_millis": 0,
"total_docs": 0,
"total_size_in_bytes": 0
},
"refresh": {
"total": 0,
"total_time_in_millis": 0
},
"flush": {
"total": 0,
"total_time_in_millis": 0
}
}
]
}
}
}
}


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.