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
Some APIs don't contain information from http status in the body #4416
Comments
Wouldn't the _version field denote whether or not a document was created or updated? Or course, this method would not work with applications that provide their own versioning mechanism. The bulk API returns the type of action executed (IndexResponse, DeleteResponse, UpdateResponse), perhaps the API should return the action type and not simply created or not (but that might be redundant in a few settings). |
the |
I agree with you, which is why I added the last sentence/paragraph. I am currently using the _version method, but would love to move away from it. My point was rather than having "created": true, it should perhaps be something like "type": "created". |
Given that the bulk API now returns an HTTP |
I vote for The biggest benefit is that we don't have to invent any names and everybody can translate these codes to meaningful values themselves easily, potentially even leveraging existing dictionary in their codebase... |
+1 for |
Fixed by #4635 |
When the information is only in the HTTP status code, which is often not communicated to the client code, it can get lost.
For index api which doesn't distinguish between a document being created and re-indexed I propose to add a
created
field to the resulting json:If there are any other API endpoints that doesn't replicate the information from http status in the json body add them in this single issue.
The text was updated successfully, but these errors were encountered: