Hacker News new | ask | show | jobs
by chrisatumd 3727 days ago
There's an index.refresh_interval setting. It defaults to 1s, so by default your data will be available for querying within one second after being indexed.
1 comments

In general, yes. But keep in mind that the Elasticsearch JVM GC could fire up right after the document is indexed and possibly run for a few seconds if there is a lot of memory pressure. When the GC is done Elasticsearch will continue to process queries but it may be the indexed data hasn't been refreshed yet. So, a query run "1 second" after the index operation may not in fact return the document. However, this would be a very rare case.