Difference in total hits and received documents count

i am using Elasticsearch 7.6.0,

i'm using python to pull data from Elasticsearch
so far i used scroll function and search_after query to paginate data

but there's difference in total hits and total document i received from Elasticsearch for same query.

and i tried same query in Kibana doc tools i am getting expected number of documents

i verified i'm using elasticsearch 7.6.0 package as well.

Thank you.

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