The documentation says that _refresh is resource-intensive.
But does calling _refresh on an index have the same impact and cost as the automatic periodic refresh that is configurable via index.refresh_interval? Is it perhaps even precisely the same operation internally?
If yes, that would mean that if index.refresh_interval is 1 s, it wouldn’t cause significant more load to call _refresh once every 10 - 20 s, right?
It does indeed trigger the same operation. Triggering it every few seconds, either through the refresh interval or via API is fine. It is however as the ocs point out a resource intensive operation, so calling it after every indexing request, which some users try to do in order to get near real-time search availability, can quickly add a lot of overhead and cause performance problems.
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.