# Read number of document marked as delete from stats

**URL:** https://discuss.elastic.co/t/read-number-of-document-marked-as-delete-from-stats/133219
**Category:** Elasticsearch
**Created:** [May 24, 2018, 8:14pm UTC](https://discuss.elastic.co/t/read-number-of-document-marked-as-delete-from-stats/133219 "2018-05-24T20:14:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rah](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@Rah](https://discuss.elastic.co/u/Rah)
#### Post date: [May 24, 2018, 8:14pm UTC](https://discuss.elastic.co/t/read-number-of-document-marked-as-delete-from-stats/133219/1 "2018-05-24T20:14:27Z")

</div>

Hi,

Is there a way to read number of documents that are marked for delete in an index as Java APIs.?

_stats gives below -\>  
},  
"all": {  
"primaries": {  
"docs": {  
"count": 11,  
 **"deleted": 2**  
},  
"store": {  
"size\_in\_bytes": 61138,  
"throttle\_time\_in\_millis": 0  
},  
"indexing": {  
"index\_total": 13,  
"index\_time\_in\_millis": 482,  
"index\_current": 0,  
"index\_failed": 7,  
\*\*"delete\_total": 0,_\*\*  
"delete\_time\_in\_millis": 0,  
"delete\_current": 0,  
"noop\_update\_total": 0,  
"is\_throttled": false,  
"throttle\_time\_in\_millis": 0  
},

I want to read deleted and deleted\_total from the above in JAVA API.  
I have tried ClusterAdminClient and IndicesAdminClient but they dont provide any such api to read mark for deleted document count from stats.

Thanks,  
RAH

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 21, 2018, 8:14pm UTC](https://discuss.elastic.co/t/read-number-of-document-marked-as-delete-from-stats/133219/2 "2018-06-21T20:14:33Z")

</div>

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