News for hackers. Stuff that matters.
Re:How we get high availability with Elasticsearch and Ruby ... by brndn on Friday April 08, 2016 @05:27PM (#11458161)
I started using elasticsearch recently and I was wondering, does the indexing happen in real time during the index request? How do you know how long the indexing process takes?
Re:How we get high availability with Elasticsearch and Ruby ... by acehyzer on Friday April 08, 2016 @05:34PM (#11458227)
It happens pretty much real time. While using cURL or the .NET client it doesn't return a response until the indexing is finished. You can verify this by querying your index for some basic info. For example you could even just put the following in the browser:

http://hostname:9200/_cat/indices

The 6th column gives you the number of records indexed. Send your request and refresh the browser.

Re:How we get high availability with Elasticsearch and Ruby ... by chrisatumd on Friday April 08, 2016 @07:07PM (#11458837)
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.
Re:How we get high availability with Elasticsearch and Ruby ... by nemo44x on Tuesday April 12, 2016 @04:36PM (#11483346)
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.