# How to find track\_total\_hits value for a specific point\_in\_time (pit\_id)?

**URL:** <https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965>\
**Category:** Security Analytics\
**Created:** [September 20, 2023, 5:17pm UTC](https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965 "2023-09-20T17:17:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raji](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@Raji](https://forum.opensearch.org/u/Raji)\
**Post date:** [September 20, 2023, 5:17pm UTC](https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965/1 "2023-09-20T17:17:28Z")

</div>

I was expecting how much total hits is taken snapshot while creating the point in time id

Example:

When i create a PIT id for a specific index.  
POST /value\*/\_search/point\_in\_time?keep\_alive=1d

Now I need to slice the result into multiple pages so I need to give a max and id value for that eg:  
{“query”:  
{“bool”:  
{“should”:[{“match\_phrase”:{“host”:“General”}}],  
“must”:[{“range”:{“@timestamp”:{“gte”:“now-1d”,“lt”:“now”}}}}},  
“size”:10000,  
“slice”:{“id”:0,“max”:100},  
“pit”:{“id”:“xxxxxxxxxxxxxx”  
}}

So in order to find the max value I need total logs count but in PIT I was unable to get to what are the total count of logs it have snapshot for that specific id

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [September 21, 2023, 5:41am UTC](https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965/2 "2023-09-21T05:41:58Z")

</div>

I think the max parameter in slice is not the total hit count, it’s just the number of slices, it can be the number of shards of the index.

---

<div class="post-metadata">

**Author:** ![Raji](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@Raji](https://forum.opensearch.org/u/Raji)\
**Post date:** [September 21, 2023, 6:49am UTC](https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965/3 "2023-09-21T06:49:05Z")

</div>

Yes you are correct, max value represent the number of slices, I am working on pagination so I consider this max value as my page number so if I was able to get total hit count that was present for the specific pit id I can calculate how many slices/pages I need.

So I need to find how can we get the total hit count that was present during the pit id creation

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [November 20, 2023, 6:49am UTC](https://forum.opensearch.org/t/how-to-find-track-total-hits-value-for-a-specific-point-in-time-pit-id/15965/4 "2023-11-20T06:49:47Z")

</div>

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