However, the update in elasticSearch takes a while (magnitude of hours) to
show up. Are there any settings in elastic search that we need to be aware
of which can help us amend this and get immediate updates?
We have 1 replica, 5 shards. It used to immediately update until recently
and we've tried flushing the index and that doesn't help either.
However, the update in elasticSearch takes a while (magnitude of
hours) to show up. Are there any settings in Elasticsearch that we
need to be aware of which can help us amend this and get immediate
updates?
You need to refresh the index. If you're just doing an individual
index operation and you want to see the results show up in search,
you should perform a client.admin().indices().prepareRefresh(index)
afterward.
If you need to change ES's default refresh interval, you can change
this value to something within a few min:
index.engine.robin.refresh_interval: 5m
Don't drop that too low though because it will slow indexing
considerably while ES has to wait for disk IO.
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.