Remove deprecated created and found from index, delete and bulk#25516
Remove deprecated created and found from index, delete and bulk#25516nik9000 merged 3 commits intoelastic:masterfrom
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
| @Override | ||
| public DeleteResponse build() { | ||
| DeleteResponse deleteResponse = new DeleteResponse(shardId, type, id, seqNo, primaryTerm, version, found); | ||
| DeleteResponse deleteResponse = new DeleteResponse(shardId, type, id, seqNo, primaryTerm, version, |
There was a problem hiding this comment.
I think you should pass the Result here. Maybe also add an assertion in the ctor that the result is either Result.DELETED or Result.NOT_FOUND.
| public IndexResponse build() { | ||
| IndexResponse indexResponse = new IndexResponse(shardId, type, id, seqNo, primaryTerm, version, created); | ||
| IndexResponse indexResponse = new IndexResponse(shardId, type, id, seqNo, primaryTerm, version, | ||
| result == Result.CREATED ? true : false); |
There was a problem hiding this comment.
Same deal here as on Delete. I think you should pass the result into the ctor and assert that it is sane.
| "successful": 1, | ||
| "failed": 0 | ||
| }, | ||
| "created": true, |
There was a problem hiding this comment.
I'm so glad we assert that these are right now!
There was a problem hiding this comment.
This is exactly the kind of thing I'd miss when removing these without the assertions.
|
Marked as |
|
@nik9000 thanks for the feedback! Just pushed a new commit |
This reverts commit bde2156.
|
Ah! I see now. The way you had it first was better. I'll revert the second commit and merge. |
|
Thanks @olcbean! I've merged to master. |
* master: Remove deprecated created and found from index, delete and bulk (elastic#25516) fix testEnsureVersionCompatibility for 5.5.0 release fix Version.v6_0_0 min compatibility version to 5.5.0 Add bwc indices for 5.5.0 Add v5_5_1 constant [DOCS] revise high level client Search Scroll API docs (elastic#25599) Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (elastic#24437) Avoid SecurityException in repository-S3 on DefaultS3OutputStream.flush() (elastic#25254) [Tests] Add tests for CompletionSuggestionBuilder#build() (elastic#25575)
* master: (42 commits) Harden global checkpoint tracker Remove deprecated created and found from index, delete and bulk (elastic#25516) fix testEnsureVersionCompatibility for 5.5.0 release fix Version.v6_0_0 min compatibility version to 5.5.0 Add bwc indices for 5.5.0 Add v5_5_1 constant [DOCS] revise high level client Search Scroll API docs (elastic#25599) Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (elastic#24437) Avoid SecurityException in repository-S3 on DefaultS3OutputStream.flush() (elastic#25254) [Tests] Add tests for CompletionSuggestionBuilder#build() (elastic#25575) Enable cross-setting validation [Docs] Fix typo in bootstrap-checks.asciidoc (elastic#25597) Index ids in binary form. (elastic#25352) bwc checkout should fetch from all remotes IndexingIT should check for global checkpoints regardless of master version [Tests] Add tests for PhraseSuggestionBuilder#build() (elastic#25571) Remove unused class MinimalMap (elastic#25590) [Docs] Document Scroll API for Java High Level REST Client (elastic#25554) Disable date field mapping changing (elastic#25285) Allow BWC Testing against a specific branch (elastic#25510) ...
|
@nik9000 Excellent, this is what I was hoping the final change to look like. Sorry about the confusion with the belated push earlier :) |
Added 'result' field to Elasticsearch QueryResult struct for compatibility with 6.x Index and Delete API responses. See elastic/elasticsearch#25516 for more info. Fixes elastic#4661
Added 'result' field to Elasticsearch QueryResult struct for compatibility with 6.x Index and Delete API responses. See elastic/elasticsearch#25516 for more info. Fixes #4661
The
createdandfoundfields in index and delete responses became obsolete after the introduction of theresultfield in index, update and delete responses (#19566).After deprecating the
createdandfoundfields in 5.x (#19633), now they are removed.Fixes #19630