Skip to content

Commit 44d9e0d

Browse files
committed
[7.14] Document the Elasticsearch product check
1 parent 0972800 commit 44d9e0d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: docs/sphinx/transports.rst

+21
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,27 @@ and lightweight than the optional ``requests``-based class. Only use
2121
``RequestsHttpConnection`` if you have need of any of ``requests`` advanced
2222
features like custom auth plugins etc.
2323

24+
Product check on first request
25+
------------------------------
26+
27+
Starting in v7.14.0 the client performs a required product check before
28+
the first API call is executed. This product check allows the client to
29+
establish that it's communicating with a valid Elasticsearch cluster.
30+
31+
The product check requires a single HTTP request to the ``info`` API. In
32+
most cases this request will succeed quickly and then no further product
33+
check HTTP requests will be sent.
34+
35+
The product check will verify that the ``X-Elastic-Product: Elasticsearch``
36+
HTTP header is being sent or if the ``info`` API response has proper values
37+
of ``tagline`` and ``version.build_flavor``.
38+
39+
If the client detects that it's not connected to Elasticsearch the
40+
``NotElasticsearchError`` exception will be raised. In previous versions
41+
of Elasticsearch the ``info`` API required additional permissions so
42+
if an authentication or authorization error is raised during the
43+
product check then an ``ElasticsearchWarning`` is raised and the client
44+
proceeds normally.
2445

2546
.. py:module:: elasticsearch.connection
2647

0 commit comments

Comments
 (0)