0.15.1 Index creation / Put mappings race condition

Hey,
Just moved to 0.15.1 from 0.14.2. When my app starts with a fresh
cluster it does the following:
for index : indexes
Create index
Apply mappings

I am getting index not found errors when applying the mappings to a
just created index. After adding a 200ms sleep between the create and
put mappings, everything seems fine.

Thanks,
Paul

Can you gist the exception message? Strange that it happens (I assume you wait for the create index request to happen?). Its usually better to have the mappings provided as part of the index request (more atomic), but what you do shoudl still work...
On Wednesday, March 2, 2011 at 2:57 AM, Paul wrote:

Hey,
Just moved to 0.15.1 from 0.14.2. When my app starts with a fresh
cluster it does the following:
for index : indexes
Create index
Apply mappings

I am getting index not found errors when applying the mappings to a
just created index. After adding a 200ms sleep between the create and
put mappings, everything seems fine.

Thanks,
Paul

The exception looks like this:
org.elasticsearch.indices.IndexMissingException: [idol-markithub]
missing

No stack trace with it.

What does the java code look like to create the index and apply the
mappings at the same time?

Thanks,
Paul

On Mar 1, 6:37 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Can you gist the exception message? Strange that it happens (I assume you wait for the create index request to happen?). Its usually better to have the mappings provided as part of the index request (more atomic), but what you do shoudl still work...

On Wednesday, March 2, 2011 at 2:57 AM, Paul wrote:

Hey,
Just moved to 0.15.1 from 0.14.2. When my app starts with a fresh
cluster it does the following:
for index : indexes
Create index
Apply mappings

I am getting index not found errors when applying the mappings to a
just created index. After adding a 200ms sleep between the create and
put mappings, everything seems fine.

Thanks,
Paul

The create index API allows you to add mappings to it.
On Thursday, March 3, 2011 at 10:33 PM, Paul wrote:

The exception looks like this:
org.elasticsearch.indices.IndexMissingException: [idol-markithub]
missing

No stack trace with it.

What does the java code look like to create the index and apply the
mappings at the same time?

Thanks,
Paul

On Mar 1, 6:37 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Can you gist the exception message? Strange that it happens (I assume you wait for the create index request to happen?). Its usually better to have the mappings provided as part of the index request (more atomic), but what you do shoudl still work...

On Wednesday, March 2, 2011 at 2:57 AM, Paul wrote:

Hey,
Just moved to 0.15.1 from 0.14.2. When my app starts with a fresh
cluster it does the following:
for index : indexes
Create index
Apply mappings

I am getting index not found errors when applying the mappings to a
just created index. After adding a 200ms sleep between the create and
put mappings, everything seems fine.

Thanks,
Paul