Skip to content

[Backport 9.0] [docs] Fix various syntax and rendering errors #2944

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference/client-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can find here a collection of simple helper functions that abstract some spe

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

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).
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).

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:

Expand Down
8 changes: 3 additions & 5 deletions docs/reference/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Python Elasticsearch client provides several ways to send queries to Elastic

Elasticsearch APIs are grouped by namespaces.

* There's the global namespace, with APIs like the Search API (`GET _search`) or the Index API (`PUT /<target>/_doc/<_id>` and related endpoints).
* There's the global namespace, with APIs like the Search API (`GET _search`) or the Index API (`PUT /<target>/_doc/<_id>` and related endpoints).
* Then there are all the other namespaces, such as:
* Indices with APIs like the Create index API (`PUT /my-index`),
* ES|QL with the Run an ES|QL query API (`POST /_async`),
Expand All @@ -28,10 +28,8 @@ How can you figure out the namespace?
* 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.


:::{image} ../images/python-example.png
:alt: Python code example in the Elasticsearch guide
:::

![Python code example in the Elasticsearch guide](images/python-example.png)

## Parameters

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:
Expand Down