When a document is indexed into Elasticsearch, it is written to the transaction log. At this point it is not yet available for searching. Making data from the transaction log available for searching is done when a segment is created through a refresh. As this is an expensive operation, it is only done periodically. The frequency is determined by the refresh_interval of the index, which defaults to 1 second.
When you index, you can instruct it tonot return until a refresh has occurred. You can also force a refresh when you index, but this can dramatically reduce your indexing throughput.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.