Remove opaque_id from the client constructor

This commit is contained in:
Seth Michael Larson
2020-03-19 13:23:52 -05:00
committed by GitHub
parent c38918dafc
commit 7b6a12f2e5
4 changed files with 5 additions and 17 deletions
+4 -5
View File
@@ -70,13 +70,12 @@ or to help with `identifying running tasks <https://www.elastic.co/guide/en/elas
.. code-block:: python
import elasticsearch
from elasticsearch import Elasticsearch
# You can add to the client to apply to all requests
client = elasticsearch.Elasticsearch(opaque_id="[email protected]_user1234")
client = Elasticsearch()
# Or you can apply per-request for more granularity.
resp = client.get(index="test", id="1", opaque_id="[email protected]_user1234")
# You can apply X-Opaque-Id in any API request via 'opaque_id':
resp = client.get(index="test", id="1", opaque_id="request-1")
.. py:module:: elasticsearch