diff --git a/elasticsearch/helpers/actions.py b/elasticsearch/helpers/actions.py index a218c5e8c..48e45f05c 100644 --- a/elasticsearch/helpers/actions.py +++ b/elasticsearch/helpers/actions.py @@ -672,7 +672,14 @@ def pop_transport_kwargs(kw: MutableMapping[str, Any]) -> Dict[str, Any]: # Grab options that should be propagated to every # API call within this helper instead of just 'search()' transport_kwargs = {} - for key in ("headers", "api_key", "http_auth", "basic_auth", "bearer_auth"): + for key in ( + "headers", + "api_key", + "http_auth", + "basic_auth", + "bearer_auth", + "opaque_id", + ): try: value = kw.pop(key) if key == "http_auth":