Hi, I think I may have found another timing issue, I occasionally encounter
an index doesn't exist exception when attempting to index.
The index doesn't exist that is true but I thought I had read that if it
doesn't exist it is created and this must be since it is only sometimes I
see this exception most of the time it works.
I have encountered this with both local unit testing and connecting to a
running instance.
Comes from: IndexResponse indexResponse =
client.index(indexRequest).actionGet()
There is probably a timing issue here, can you open an issue and lets see if
I can recreate this to fix it...
-shay.banon
On Sat, Jun 19, 2010 at 4:12 AM, Samuel Doyle samueldoyle@gmail.com wrote:
Hi, I think I may have found another timing issue, I occasionally
encounter an index doesn't exist exception when attempting to index.
The index doesn't exist that is true but I thought I had read that if it
doesn't exist it is created and this must be since it is only sometimes I
see this exception most of the time it works.
I have encountered this with both local unit testing and connecting to a
running instance.
Comes from: IndexResponse indexResponse =
client.index(indexRequest).actionGet()
I have also seen this, but just assumed it was a side effect of eventually
consistent.
A workaround I have is to poll, using the admin client doing a
indices.status request, in a loop and wait until the index appears in the
list.
Hope that helps!
On Sat, Jun 19, 2010 at 10:30 PM, Shay Banon
shay.banon@elasticsearch.comwrote:
There is probably a timing issue here, can you open an issue and lets see
if I can recreate this to fix it...-shay.banon
On Sat, Jun 19, 2010 at 4:12 AM, Samuel Doyle samueldoyle@gmail.comwrote:
Hi, I think I may have found another timing issue, I occasionally
encounter an index doesn't exist exception when attempting to index.
The index doesn't exist that is true but I thought I had read that if it
doesn't exist it is created and this must be since it is only sometimes I
see this exception most of the time it works.
I have encountered this with both local unit testing and connecting to a
running instance.
Comes from: IndexResponse indexResponse =
client.index(indexRequest).actionGet()