Has there been any changes to the Elasticsearch version being used?
Its been a while since I worked with Elasticsearch, but just as an experiment, instead of just removing the indices, could you remove the complete data folder - just to see whether it initialises the mapping correctly. You error message appears to suggest some data is being written which is creating an incorrect mapping - and then when the real schema is being applied it is failing.
Thank you very much for responding.
No changes to the Elasticsearch version, we are using 1.3.2. Already tried to remove the data folder, at the next JBoss restart the indices are created. Restarting JBoss once more then and the issue happens.
In some other environments it is running fine as by now.
Sorry don't know what to suggest then - this seems very strange behaviour, as it implies that the indices are created correctly on first start, but then somehow don't exist on second start, so Elasticsearch is using a default mapping - but then it tries to create the mapping again resulting in the errors.
Is there any task running after the server shuts down that would possibly clear the indices?
For us it looks like something is modifying the mapping in some cases, but we could not find the cause.
We tried to reindex existing data with wrong mapping with a 3rd party Elasticsearch plugin into a index with a proper mapping. Works in our test environments, so we have a workaround.
Thanks you very much for your help!