For example when I have ids lookup and want to search one by by one to see if the document already exists or not. One of two things happen:

First -> first search request returns the correct doc and all the calls after that returns the same doc as first one even though I was searching for different Ids
Second -> first search request returns the correct doc and all the calls after that returns empty hits array even though I was searching for different Ids. The search metadata does tell me that "total" was one for this request but no actual hits are returned.

I have been facing this weird behaviour with ElasticSearch.py and using raw http requests as well. 
Could it be firewall that is causing some sort of weird caching behaviour? 
Is there anyway to force the results?
Any ideas are welcome at this point.
Thanks in advance!
It was the firewall caching that was causing the havoc! Once the caching was disabled for certain endpoints, the issue resolved itself. Painful!
ElasticSearch doesn't return hits when making consecutive calls - Python