How long takes to ES to make a created document available to be queried?

I have a process that creates a document in ES, then one second after another process runs
and try to make use of the previously created document.
For some reason the second process is not able to find the document created by the first process.

could be that the timeframe between the two processes calls is not enough? If so, can someone point me to some documentation where I can read about it, any help will be appreciated.

I'm using:
Elasticsearch client for Node.js v2.4.3
elastic search version: 1.6.2
lucene version: 4.10.4

Thanks in advance,


Take a look at this chapter -