Skip to content

Commit 022beb4

Browse files
[docs] Fix various syntax and rendering errors (#2940) (#2944)
* fix various syntax and rendering issues * fix image (cherry picked from commit 631956d) Co-authored-by: Colleen McGinnis <[email protected]>
1 parent 051cdc7 commit 022beb4

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

docs/reference/client-helpers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can find here a collection of simple helper functions that abstract some spe
1212

1313
There are several helpers for the bulk API since its requirement for specific formatting and other considerations can make it cumbersome if used directly.
1414

15-
All bulk helpers accept an instance of `{{es}}` class and an iterable `action` (any iterable, can also be a generator, which is ideal in most cases since it allows you to index large datasets without the need of loading them into memory).
15+
All bulk helpers accept an instance of `Elasticsearch` class and an iterable `action` (any iterable, can also be a generator, which is ideal in most cases since it allows you to index large datasets without the need of loading them into memory).
1616

1717
The items in the iterable `action` should be the documents we wish to index in several formats. The most common one is the same as returned by `search()`, for example:
1818

docs/reference/querying.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Python Elasticsearch client provides several ways to send queries to Elastic
66

77
Elasticsearch APIs are grouped by namespaces.
88

9-
* There's the global namespace, with APIs like the Search API (`GET _search`) or the Index API (`PUT /<target>/_doc/<_id>` and related endpoints).
9+
* There's the global namespace, with APIs like the Search API (`GET _search`) or the Index API (`PUT /<target>/_doc/<_id>` and related endpoints).
1010
* Then there are all the other namespaces, such as:
1111
* Indices with APIs like the Create index API (`PUT /my-index`),
1212
* ES|QL with the Run an ES|QL query API (`POST /_async`),
@@ -28,10 +28,8 @@ How can you figure out the namespace?
2828
* Finally, for Elasticsearch 8.x, most examples in the [Elasticsearch guide](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) are also available in Python. (This is still a work in progress for Elasticsearch 9.x.) In the example below, `client.ingest.put_pipeline(...)` is the function that calls the "Create or update a pipeline" API.
2929

3030

31-
:::{image} ../images/python-example.png
32-
:alt: Python code example in the Elasticsearch guide
33-
:::
34-
31+
![Python code example in the Elasticsearch guide](images/python-example.png)
32+
3533
## Parameters
3634

3735
Now that you know which functions to call, the next step is parameters. To avoid ambiguity, the Python Elasticsearch client mandates keyword arguments. To give an example, let's look at the ["Create an index" API](https://elasticsearch-py.readthedocs.io/en/stable/api/indices.html#elasticsearch.client.IndicesClient.create). There's only one required parameter, `index`, so the minimal form looks like this:

0 commit comments

Comments
 (0)