I'm trying out elasticsearch (0.15.0) through the Java API. To do so, I
wrote a simple unit test that starts an embedded instance, indexes a
document, then searches for the document:
If I remove the WriteConsistencyLevel.QUORUM setting from the indexing
operation, then about half of the time, even after a refresh, I fail to find
the document at search time (I thought the default consistency level was
QUORUM or ALL).
If I change the write consistency to WriteConsistencyLevel.ALL, then the
test seems to hang at the indexing step.
Note, if you use the cluster health API after you create the index and wait for yellow status, then this problem will not happen.
-shay.banon
On Wednesday, March 2, 2011 at 4:05 AM, Curtis Caravone wrote:
Hi,
I'm trying out elasticsearch (0.15.0) through the Java API. To do so, I wrote a simple unit test that starts an embedded instance, indexes a document, then searches for the document: Unit test with embedded elasticsearch · GitHub
If I remove the WriteConsistencyLevel.QUORUM setting from the indexing operation, then about half of the time, even after a refresh, I fail to find the document at search time (I thought the default consistency level was QUORUM or ALL).
If I change the write consistency to WriteConsistencyLevel.ALL, then the test seems to hang at the indexing step.
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.