-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Remove] Type mapping parameter from document delete API #2213
[Remove] Type mapping parameter from document delete API #2213
Conversation
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Can one of the admins verify this patch? |
This needs to be rebased against main once #2204 is merged. |
new Route(DELETE, "/{index}/{type}/{id}") | ||
) | ||
); | ||
return unmodifiableList(asList(new Route(DELETE, "/{index}/_doc/{id}"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be just "/{index}/{id}"
? Afaik, the mapping might be changed from _doc
, but the key concept - only single mapping allowed - will stay. May be even better to support both:
asList(
new Route(DELETE, "/{index}/_doc/{id}"),
new Route(DELETE, "/{index}/{id}")
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking time and reviewing this PR.
Yes, keeping both suggested end-points make sense.
The only point I have it against is document index APIs have either _doc
or _create
in the path where it provides document index behaviour instead of document type.
But, I think for delete action, we don't need this segregation and we can use both end-points as you suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 makes sense, thanks!
|
||
@Override | ||
public List<Route> routes() { | ||
return unmodifiableList( | ||
asList( | ||
new Route(DELETE, "/{index}/_doc/{id}"), | ||
// Deprecated typed endpoint. | ||
new Route(DELETE, "/{index}/{type}/{id}") | ||
new Route(DELETE, "/{index}//{id}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I think we need only one slash, right? //
-> /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
32c9579
to
e61001c
Compare
❌ Gradle Check failure 32c9579e3d0fcb551335b78d81a20064bb37adf5 |
❌ Gradle Check failure e61001cc6de412cdeb156fd739d37ce9d8331a0e |
Signed-off-by: Suraj Singh <surajrider@gmail.com>
e61001c
to
af79400
Compare
Update: Looks like adding
|
Interesting, probably the |
Resolving in favour of #2239 |
Description
With types deprecation, this change removes type mapping API end-points provided for document update API end-point.
Relates #1940
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.