# The count of segments in nodes stats api and segment api

**URL:** <https://discuss.elastic.co/t/the-count-of-segments-in-nodes-stats-api-and-segment-api/213306>\
**Category:** Elasticsearch\
**Created:** [December 30, 2019, 3:35am UTC](https://discuss.elastic.co/t/the-count-of-segments-in-nodes-stats-api-and-segment-api/213306 "2019-12-30T03:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinhaowen](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jinhaowen](https://discuss.elastic.co/u/jinhaowen)\
**Post date:** [December 30, 2019, 3:35am UTC](https://discuss.elastic.co/t/the-count-of-segments-in-nodes-stats-api-and-segment-api/213306/1 "2019-12-30T03:35:30Z")

</div>

Hi, I had run the nodes stats api(\_nodes/stats) and get the count of segments of one node is 85, which is in nodes.indices.segments.count of response body. However when I run segments api(\_cat/segments) and filt by the ip address of the node, I get the different count of segments.  
Could anyone tell me why are these two result different? Thanks a lot!

---

<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:** [January 27, 2020, 3:35am UTC](https://discuss.elastic.co/t/the-count-of-segments-in-nodes-stats-api-and-segment-api/213306/2 "2020-01-27T03:35:34Z")

</div>

Closed on January 27, 2020, 3:35am UTC

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