I am a little confused with the results. I have a simple query to get the latest document added (based on sorted created date or timestamp):
query = {
"query": {"match_all": {}},
"sort": [
{"created_date": "desc"}
],
"size": 1
}
When I use helpers.scan() abstraction over Scroll() API. I get a hit which is different each time (inconsistent). My Elastic cluster is static (no new data points are being added) and the inconsistency in response is strange as I have sorted all entries and asked to return the the first hit (size 1) in my query. What am I missing here ?