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

Allow creation of empty docs #1195

Closed
outoftime opened this issue Aug 2, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@outoftime
Copy link

commented Aug 2, 2011

Per conversation on IRC, there's no reason not to allow creation of empty documents. Currently ES will throw an error both on a PUT with no data or a PUT with an empty JSON object as the data:

$ curl -XPUT http://localhost:9200/test/test/1 -d '{}'
{"error":"MapperParsingException[Malformed content, after first object, either the type field or the actual properties should exist]","status":400}
$ curl -XPUT http://localhost:9200/test/test/1
{"error":"ElasticSearchParseException[Failed to derive xcontent from []]","status":500}
@kimchy

This comment has been minimized.

Copy link
Member

commented Aug 3, 2011

PUT with no data is problematic to how ES works, and not sure it makes sense, but one with empty json '{}' should be supported.

@kimchy kimchy closed this in 598370b Aug 3, 2011

@outoftime

This comment has been minimized.

Copy link
Author

commented Aug 3, 2011

Sure! Was just suggesting that it would be nice for one of the to to work : )

On Wed, Aug 3, 2011 at 05:19, kimchy
reply@reply.github.com
wrote:

PUT with no data is problematic to how ES works, and not sure it makes sense, but one with empty json '{}' should be supported.

Reply to this email directly or view it on GitHub:
#1195 (comment)

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
You can’t perform that action at this time.