Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting and recreating a new index with dynamic mapping can cause type failures #931

Closed
gjb83 opened this issue May 13, 2011 · 1 comment

Comments

@gjb83
Copy link

gjb83 commented May 13, 2011

Environment:
elasticsearch v0.16.1, Mac OS X 10.6.7, Java 1.6.0_24 (other platforms untested)

Problem:
I am finding that if I add a document to a non-existent index, the index is automatically created, but around 20% of the time, the document is not added correctly.

Steps to reproduce:

#!/bin/sh
curl -XDELETE http://localhost:9200/myindex; echo; sleep 1; \
curl -XPOST http://localhost:9200/myindex/mytype/ -d '{ "body" : "Test" }'; echo; sleep 1; \
curl -XPOST http://localhost:9200/myindex/_refresh; echo; sleep 1; \
curl -XGET http://localhost:9200/myindex/_search?pretty=true; echo

You may have to repeat this process a few times to reproduce this problem as it doesn't happen every time.

Resulting error:

"failures" : [ {
  "reason" : "TypeMissingException[[myindex] type[mytype] missing: failed to find type loaded for doc [VwMCBKs0QpSzSsc-329USg]]"
} ]
@kimchy
Copy link
Member

kimchy commented May 15, 2011

Recreated, seems like a problem with deleting and then creating an index with dynamic mapping derived fromt eh first doc.

@kimchy kimchy closed this as completed in c823355 May 15, 2011
ofavre pushed a commit to yakaz/elasticsearch that referenced this issue Jul 18, 2011
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants