-
Notifications
You must be signed in to change notification settings - Fork 46
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
Low-level APIs #211
Low-level APIs #211
Conversation
26ac4bb
to
93b3efb
Compare
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.
I would not document the low level client at all, specifically perform_request
. Why would one ever want to use that whereas the .http
DSL is way nicer and hides the implementation details.
In terms of guides I would align naming with other libraries, e.g. https://github.com/opensearch-project/opensearch-py/blob/main/guides/json.md
You should have a working sample for this.
See other suggestions, pick and choose.
The I've already added samples for both approaches :)
|
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.
This looks good.
Before we merge, I have some concerns calling this "low level". In OpenSearch Java client this is not the meaning at all - a low level API comes form OpenSearch core, while a high level API comes from the client. In the Python client we called this "raw JSON", https://github.com/opensearch-project/opensearch-py/blob/main/guides/json.md.
Maybe this is just an API to make "raw HTTP requests"? Does "low" add a lot of meaning?
Having a similar discussion in opensearch-project/opensearch-js#649 as you can see ;)
WDYT?
535fa43
to
93607c6
Compare
@dblock That makes sense. I've updated the PR according to make it consistent with other clients. |
93607c6
to
15e5c2b
Compare
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.
Can we rename the code and file names and mentions of low_level
to http
as well? It feels like some kind of class of APIs, but really this is just the 6 HTTP methods. Why call it another name?
2906e8c
to
2fe8ce4
Compare
- Generator for low-level methods - Generated low-level methods - Guide for low-level methods - Samples for low-level methods Signed-off-by: Theo Truong <theotr@amazon.com>
2fe8ce4
to
3b42315
Compare
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.
Looks great!
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.
LGTM!
Issues Resolved
closes #209
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.