Skip to content
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

Wrong DeprecationWarning for opaque_id in scroll_kwargs of scan function #2219

Closed
itsx opened this issue May 18, 2023 · 0 comments · Fixed by #2220
Closed

Wrong DeprecationWarning for opaque_id in scroll_kwargs of scan function #2219

itsx opened this issue May 18, 2023 · 0 comments · Fixed by #2220

Comments

@itsx
Copy link
Contributor

itsx commented May 18, 2023

Description:
Using opaque_id in the scroll_kwargs parameter of scan helper function causes wrong DeprecationWarning:

DeprecationWarning: Passing transport options in the API method is deprecated. Use 'Elasticsearch.options()' instead.

Expected behavior:
Passing transport options from scroll_kwargs to Elasticsearch.options() handles scan helper internally. I expect that the
opaque_id parameter will be passed to Elasticsearch.options() along with other parameters.

Steps to reproduce:

from elasticsearch8.helpers import scan
...
result = scan(
    elastic,
    index=index,
    query={"query": query_body, "sort": sort},
    scroll_kwargs={"opaque_id": "app-name"},
)

Elasticsearch version:
Elasticsearch 8.7.1
elasticsearch8 8.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant