I am new to elastic search. I just want to know what does setrefresh do ?
from the docs http://www.elasticsearch.org/guide/reference/api/index_/
It says it makes it available to search.
I am interested in knowing some internals to how does refresh happen ?
Does it refreshes the whole cache ? Or only merges the segments which
contains the document.
Does setrefersh effects "other" documents also ?
On Wednesday, June 5, 2013 6:04:59 PM UTC+5:30, Arjit Gupta wrote:
Hi,
I am new to Elasticsearch. I just want to know what does setrefresh do ?
from the docs Elasticsearch Platform — Find real-time answers at scale | Elastic
It says it makes it available to search.
I am interested in knowing some internals to how does refresh happen ?
Does it refreshes the whole cache ? Or only merges the segments which
contains the document.
Does setrefersh effects "other" documents also ?
refreshing is an expensive operation, which makes data, that has been
recently indexed, available for searching.
Because it is that expensive, a refresh is executed once per second in the
background instead of every indexing operation.
Refresh does not refresh a cache. Refresh does not do a merge.
Refresh affects all documents, which have been indexed since the last
refresh.
So what does it do? In order to understand this, you need to know, that a
lucene index reader (which is used for searches at the end) is always a
snapshot of data at a certain time. In order to search in recently indexed
documents, you need move the point in time and index reader can read from,
to a newer point. And this is exactly what the refresh call is doing.
Hi to all,
thanks Alexander for your explanation. But I've an additional question when using the bulk index/update call via node-client with enabled refresh option in elasticsearch version 1.5.2.
Is it guaranteed that the IndexReader is updated during the bulkRequest.execute().actionGet() method call, so that all new or updated docs are searchable directly afterwards?
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.