-
Notifications
You must be signed in to change notification settings - Fork 185
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
Fix: re-add service to fix integration with LangChain. #603
Conversation
d477594
to
e2d012f
Compare
@dblock its not necessary related to AOSS. Even in AOS/OSS, if user is asking for OpenSearch service to generate the ids for the data, os client should not send _id in the bulk request. |
The code is pretty explicit :) def _is_aoss_enabled(http_auth: Any) -> bool:
"""Check if the service is http_auth is set as `aoss`."""
if (
http_auth is not None
and hasattr(http_auth, "service")
and http_auth.service == "aoss"
):
return True
return False |
e2d012f
to
456af1d
Compare
Signed-off-by: dblock <[email protected]>
456af1d
to
4708826
Compare
This code is explicit, because AOSS doesn't support _id. But given that client is generic and AOSS support _id for search collection. So if we make this change then search collections will break. This is the reason why I am saying the expectation from opensearch-py is if user has not provided _id, client should not add of its own whether it is AOS, OSS or AOSS. |
Agreed. It does not. Am I missing anything? |
…rch-project#603) Signed-off-by: dblock <[email protected]> Signed-off-by: roma2023 <[email protected]>
Description
Re-add
.service
, which is used by LangChain to figure out whether we're talking to AOSS. This broke in #547.Issues Resolved
Closes #600
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.