Elastic Search Returns inconsistent results when running on a single node

We have indexed Data using elastic search on a single node. And we have a thread running in the background used for updating the index with the recent changes.

Now we are using elastic search API's to run the search query. However , the search query returns inconsistent results. On rerunning the same query continuously, sometime we get 0 results, sometime partial results and at sometimes we get complete results. We have not set any timeout for the queries.

We are facing this issue in a cluster where only one node is an indexing node .

This is happening on one of the production environments.

Options tried out:
Refreshed index - did not work.
Deleted the index and built it completely again. - still the same issue inconsistent results

Could you let us know what might be causing this issue.?

The issue has been resolved. We are setting a timeout value of zero at some place in our code . This has caused the issue.