You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add convenience API key param to remote reindex (#135949)
This adds a `source.remote.api_key` parameter to the reindex API. This
is equivalent to using `source.remote.headers` with `Authorization`
set to `ApiKey <api_key>`. It is a convenience for the user.
Note on docs changes: The example request using an API key now uses an
`applies-switch` to show both the pre-9.3 and post-9.3 / serverless
versions. There are a few drive-by doc bug-fixes and other improvements to
the docs, most notably:
- Adding some subsections, as suggested by a tech writer.
- Fixing the bug which meant that `<OTHER_HOST_URL>` was previously
not being rendered, because `<` is a control character.
- Repeating the note about using HTTPS for basic auth in the API key
section, as we wouldn't recommend sending API keys over plain HTTP
either.
- A nit, but writing `<OTHER_HOST_URL>:9200` is strange, since we have
a placeholder URL, and the port is part of the URL, so that's fixed.
* Update docs/reference/elasticsearch/rest-apis/reindex-indices.md
Co-authored-by: shainaraskas <[email protected]>
* add cross-reference to SSL settings in docs
* Remove the `When using {{escloud}}` caveat at the start of the API key section, since you can use API keys on pretty much any ES type
---------
Co-authored-by: shainaraskas <[email protected]>
ES-9691 #comment Added `api_key` to reindex API as convenience parameter in #135949
The `host` parameter must contain a scheme, host, port (for example, `https://otherhost:9200`), and optional path (for example, `https://otherhost:9200/proxy`).
623
-
The `username` and `password` parameters are optional, and when they are present the reindex API will connect to the remote {{es}} node using basic auth.
624
-
Be sure to use `https` when using basic auth or the password will be sent in plain text. There are a range of settings available to configure the behaviour of the `https` connection.
622
+
The `host` parameter must contain a scheme, host, port (for example, `https://<OTHER_HOST_URL>:9200`), and optional path (for example, `https://<OTHER_HOST_URL>:9200/proxy`).
625
623
626
-
When using {{ecloud}}, it is also possible to authenticate against the remote cluster through the use of a valid API key:
624
+
### Using basic auth [reindex-basic-auth]
627
625
626
+
To authenticate with the remote cluster using basic auth, set the `username` and `password` parameters, as in the example above.
627
+
Be sure to use `https` when using basic auth, or the password will be sent in plain text. There are a [range of settings](#reindex-ssl) available to configure the behaviour of the `https` connection.
628
+
629
+
### Using an API key [reindex-api-key]
630
+
631
+
It is also possible (and encouraged) to authenticate with the remote cluster through the use of a valid API key:
Be sure to use `https` when using an API key, or it will be sent in plain text. There are a [range of settings](#reindex-ssl) available to configure the behaviour of the `https` connection.
The list of allowed hosts must be configured on any nodes that will coordinate the reindex.
705
+
The list of allowed hosts must be configured on any node that will coordinate the reindex.
706
+
707
+
### Compatibility [reindex-remote-compatibility]
708
+
663
709
This feature should work with remote clusters of any version of {{es}} you are likely to find. This should allow you to upgrade from any version of {{es}} to the current version by reindexing from a cluster of the old version.
664
710
::::{warning}
665
711
{{es}} does not support forward compatibility across major versions. For example, you cannot reindex from a 7.x cluster into a 6.x cluster.
@@ -670,16 +716,18 @@ To enable queries sent to older versions of {{es}} the `query` parameter is sent
670
716
Reindexing from remote clusters does not support manual or automatic slicing.
671
717
::::
672
718
719
+
### Tuning parameters [reindex-remote-tuning]
720
+
673
721
Reindexing from a remote server uses an on-heap buffer that defaults to a maximum size of 100mb.
674
-
If the remote index includes very large documents you'll need to use a smaller batch size.
722
+
If the remote index includes very large documents you'll need to use a smaller batch size.
675
723
The example below sets the batch size to `10` which is very, very small.
0 commit comments