I found out that when using the Java API on index, i.e:
client.index(..., new ActionListener()...)
then my callback's onSuccess() method is called BEFORE the document is accessible in the index. I search for the document immediately after onSuccess() has been called, and receive an older version than what was just indexed.
I found out that when using the Java API on index, i.e:
client.index(..., new ActionListener()...)
then my callback's onSuccess() method is called BEFORE the document is
accessible in the index. I search for the document immediately after
onSuccess() has been called, and receive an older version than what was
just
indexed.
I found out that when using the Java API on index, i.e:
client.index(..., new ActionListener()...)
then my callback's onSuccess() method is called BEFORE the document is
accessible in the index. I search for the document immediately after
onSuccess() has been called, and receive an older version than what was
just
indexed.
You can certainly work like that. ElasticSearch provides near real time
search support, this means that search / get requests will only "see"
indexed documents after an interval (which can be configured). There is an
API called refresh that makes all indexable documented visible for search.
Note, refresh is not a lightweight operation, and can affect indexing
performance.
I found out that when using the Java API on index, i.e:
client.index(..., new ActionListener()...)
then my callback's onSuccess() method is called BEFORE the document is
accessible in the index. I search for the document immediately after
onSuccess() has been called, and receive an older version than what was
just
indexed.
[This is the original poster] 1. The thing is I wish to know the exact point in runtime when the document can be seen in index. That's why I use the ActionListener.
The reason for this is that pending index requests are dependent on the current index operation to finish (and for the document to be accessible).
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.