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

Consistent REST Get Field Mapping API #4738

Closed
spinscale opened this issue Jan 15, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@spinscale
Copy link
Member

commented Jan 15, 2014

As of #4071, this commit a3abcdc prepared the Get Field Mapping API. However, if index and type exist, but the field does not, it should return an empty JSON response instead of a 404 in order to be consistent.

Right now, you cannot now, if the index, type or field was the one not being found in in the rest action

@ghost ghost assigned spinscale Jan 20, 2014

@spinscale spinscale closed this in 5e58f40 Jan 28, 2014

spinscale added a commit that referenced this issue Jan 28, 2014

REST API: Consistent get field mapping response
If a get field mapping request is issued, and all but the field can be
found, the response should return an empty JSON object instead of a 404.

Closes #4738

spinscale added a commit that referenced this issue Jan 28, 2014

REST API: Consistent get field mapping response
If a get field mapping request is issued, and all but the field can be
found, the response should return an empty JSON object instead of a 404.

Closes #4738

spinscale added a commit to spinscale/elasticsearch that referenced this issue Jan 30, 2014

REST Get Field Mapping API: Fix NPE if field not existent
When fixing elastic#4738, a small issue leaked into the implementation.
The equals check in the RestAction only applied when the master node
returned the rest request, otherwise the object equality would not hold
due to being transferred over the wire and being deserialized into
another object (from and an equality point of view) than the
FieldMappingMetaData.NULL object - this could result in serialization
exceptions as an empty length bytes reference is used in toXContent.

spinscale added a commit that referenced this issue Jan 30, 2014

REST Get Field Mapping API: Fix NPE if field not existent
When fixing #4738, a small issue leaked into the implementation.
The equals check in the RestAction only applied when the master node
returned the rest request, otherwise the object equality would not hold
due to being transferred over the wire and being deserialized into
another object (from and an equality point of view) than the
FieldMappingMetaData.NULL object - this could result in serialization
exceptions as an empty length bytes reference is used in toXContent.

spinscale added a commit that referenced this issue Jan 30, 2014

REST Get Field Mapping API: Fix NPE if field not existent
When fixing #4738, a small issue leaked into the implementation.
The equals check in the RestAction only applied when the master node
returned the rest request, otherwise the object equality would not hold
due to being transferred over the wire and being deserialized into
another object (from and an equality point of view) than the
FieldMappingMetaData.NULL object - this could result in serialization
exceptions as an empty length bytes reference is used in toXContent.

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

REST API: Consistent get field mapping response
If a get field mapping request is issued, and all but the field can be
found, the response should return an empty JSON object instead of a 404.

Closes elastic#4738

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

REST Get Field Mapping API: Fix NPE if field not existent
When fixing elastic#4738, a small issue leaked into the implementation.
The equals check in the RestAction only applied when the master node
returned the rest request, otherwise the object equality would not hold
due to being transferred over the wire and being deserialized into
another object (from and an equality point of view) than the
FieldMappingMetaData.NULL object - this could result in serialization
exceptions as an empty length bytes reference is used in toXContent.
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.