From da3d145ef07e0706d7ffc20a70a0a1248e3ced4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 11 Mar 2026 13:54:11 +0100 Subject: [PATCH 01/10] [CPS] Document how reindex work in CPS. --- .../rest-apis/reindex-indices.md | 90 +++++++++++++++++-- 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 2e2e492a6e810..0dfddb39adfc8 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -34,6 +34,7 @@ You can learn how to: **Route or send data elsewhere** - [Reindex with custom routing](#docs-reindex-routing) - [Reindex with an ingest pipeline](#reindex-with-an-ingest-pipeline) +- [Reindex in {{cps}}](#reindex-cps) - [Reindex from remote](#reindex-from-remote) **Troubleshooting** @@ -589,6 +590,90 @@ Think of the possibilities! Just be careful; you are able to change: Setting `_version` to `null` or clearing it from the `ctx` map is just like not sending the version in an indexing request; it will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API request. +## Reindex in {{cps}} [reindex-cps] +```{applies_to} +serverless: preview +``` + +When [{{cps}}](docs-content://explore-analyze/cross-project-search.md) is enabled, the [Reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex) can pull documents from indices across linked {{serverless-short}} projects. +The `source.index` field resolves across the origin project and all of its linked projects. +You can narrow the scope of the source using [project routing](docs-content://explore-analyze/cross-project-search/cross-project-search-project-routing.md) or [qualified index expressions](docs-content://explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions). +Documents are always written to the destination index on the origin project. + +There are two ways to reindex in {{cps-init}}: + +* [**Reindex across linked projects**](#reindex-cps-linked): reindex from projects that are linked to the origin project in the {{ecloud}} UI. This mode does not use `source.remote` and works like other {{cps}}-enabled endpoints. +* [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. + +### Reindex across linked projects [reindex-cps-linked] + +Without `source.remote`, the Reindex API works like other {{cps}}-enabled endpoints: + +* Only projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) in the {{ecloud}} UI can be targeted. +* The `source.index` field resolves across the origin project and all linked projects. +* You can use `project_routing` in the `source` section to limit which projects are included. +* Qualified index expressions (for example, `project1:logs`) are supported. + +The following request reindexes documents from the `logs` index across all linked projects whose `_csp` tag matches `aws`: + +```console +POST _reindex +{ + "source": { + "project_routing": "_csp:aws", + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +### Reindex from a remote project [reindex-cps-remote] + +When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project via the {{ecloud}} UI. + +The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. + +The following request reindexes documents from the `logs` index on a remote project. Because `source.index` resolves across projects, documents are pulled from `logs` indices across the remote project and all of its linked projects: + +```console +POST _reindex +{ + "source": { + "remote": { + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443" + }, + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +You can add `project_routing` to the `source` section to limit which of the remote project's linked projects are included. The following request limits the reindex source to the remote project's origin project only: + +```console +POST _reindex +{ + "source": { + "remote": { + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443" + }, + "project_routing": "_alias:_origin", + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +::::{note} +`project_routing` is not supported when the remote target is an {{ech}} deployment. If you include `project_routing` in a request targeting an {{ech}} deployment, the request returns an error. +:::: + ## Reindex from remote [reindex-from-remote] ```{applies_to} stack: ga @@ -618,11 +703,6 @@ POST _reindex } } ``` -% TEST[setup:host] -% TEST[s/^/PUT my-index-000001\n/] -% TEST[s/"host": [^}]*,/"host": "http:\/\/\${host}",/] -% TEST[s/"username": "user",/"username": "test_admin",/] -% TEST[s/"password": "pass"/"password": "x-pack-test-password"/] The `host` parameter must contain a scheme, host, port (for example, `https://:9200`), and optional path (for example, `https://:9200/proxy`). From 7dafd1900333e7d80942005da44ceff2a2225495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 11 Mar 2026 14:00:04 +0100 Subject: [PATCH 02/10] Add CPS subs. --- docs/docset.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/docset.yml b/docs/docset.yml index 8e4b073709cb1..8cd1292ce6271 100644 --- a/docs/docset.yml +++ b/docs/docset.yml @@ -37,6 +37,9 @@ subs: api-path-parms-title: "Path parameters" api-request-body-title: "Request body" api-examples-title: "Examples" + cps: "cross-project search" + cps-init: "CPS" + cps-cap: "Cross-project search" ecloud: "Elastic Cloud" ess: "Elasticsearch Service" ece: "Elastic Cloud Enterprise" From a723d9a7cb5eb17acdf830a6680ff8ad60a0d989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 11 Mar 2026 14:08:37 +0100 Subject: [PATCH 03/10] More edits. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 0dfddb39adfc8..0351cb8f2b24f 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -602,14 +602,14 @@ Documents are always written to the destination index on the origin project. There are two ways to reindex in {{cps-init}}: -* [**Reindex across linked projects**](#reindex-cps-linked): reindex from projects that are linked to the origin project in the {{ecloud}} UI. This mode does not use `source.remote` and works like other {{cps}}-enabled endpoints. +* [**Reindex across linked projects**](#reindex-cps-linked): reindex from projects that are linked to the origin project. * [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. ### Reindex across linked projects [reindex-cps-linked] -Without `source.remote`, the Reindex API works like other {{cps}}-enabled endpoints: +Without using `source.remote`, the Reindex API pulls documents from linked projects: -* Only projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) in the {{ecloud}} UI can be targeted. +* Only [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) projects can be targeted. * The `source.index` field resolves across the origin project and all linked projects. * You can use `project_routing` in the `source` section to limit which projects are included. * Qualified index expressions (for example, `project1:logs`) are supported. @@ -631,7 +631,7 @@ POST _reindex ### Reindex from a remote project [reindex-cps-remote] -When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project via the {{ecloud}} UI. +When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project. The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. From 11181c3fb1662aa9f5bb1cc0c07f3461676f198a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 12 Mar 2026 15:09:53 +0100 Subject: [PATCH 04/10] Addresses feedback. --- .../elasticsearch/rest-apis/reindex-indices.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 0351cb8f2b24f..b288f3a41b854 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -602,25 +602,25 @@ Documents are always written to the destination index on the origin project. There are two ways to reindex in {{cps-init}}: -* [**Reindex across linked projects**](#reindex-cps-linked): reindex from projects that are linked to the origin project. +* [**Reindex across linked projects**](#reindex-cps-linked): reindex from the origin project and its [linked projects](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md). * [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. ### Reindex across linked projects [reindex-cps-linked] -Without using `source.remote`, the Reindex API pulls documents from linked projects: +When not using `source.remote`, the Reindex API pulls documents from the origin project and its linked projects: -* Only [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) projects can be targeted. +* Only the origin project and projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) to it can be targeted. * The `source.index` field resolves across the origin project and all linked projects. * You can use `project_routing` in the `source` section to limit which projects are included. * Qualified index expressions (for example, `project1:logs`) are supported. -The following request reindexes documents from the `logs` index across all linked projects whose `_csp` tag matches `aws`: +The following request reindexes documents from the `logs` index, limiting the source to the linked project with alias `project1`: ```console POST _reindex { "source": { - "project_routing": "_csp:aws", + "project_routing": "_alias:project1", "index": "logs" }, "dest": { @@ -635,14 +635,15 @@ When using `source.remote.host`, you can reindex from {{serverless-short}} proje The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. -The following request reindexes documents from the `logs` index on a remote project. Because `source.index` resolves across projects, documents are pulled from `logs` indices across the remote project and all of its linked projects: +The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): ```console POST _reindex { "source": { "remote": { - "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443" + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", + "api_key": "" }, "index": "logs" }, @@ -659,7 +660,8 @@ POST _reindex { "source": { "remote": { - "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443" + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", + "api_key": "" }, "project_routing": "_alias:_origin", "index": "logs" From 8e336263dfe3ac89baf2912af27db9e4e4f211ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Mar 2026 09:24:39 +0100 Subject: [PATCH 05/10] Address feedback. --- .../rest-apis/reindex-indices.md | 177 +++++++++--------- 1 file changed, 89 insertions(+), 88 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index b288f3a41b854..d85f1dc9e63d8 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -34,8 +34,8 @@ You can learn how to: **Route or send data elsewhere** - [Reindex with custom routing](#docs-reindex-routing) - [Reindex with an ingest pipeline](#reindex-with-an-ingest-pipeline) -- [Reindex in {{cps}}](#reindex-cps) - [Reindex from remote](#reindex-from-remote) +- [Reindex in {{cps}}](#reindex-cps) **Troubleshooting** - [Monitor reindex tasks](#monitor-reindex-tasks) @@ -590,92 +590,6 @@ Think of the possibilities! Just be careful; you are able to change: Setting `_version` to `null` or clearing it from the `ctx` map is just like not sending the version in an indexing request; it will cause the document to be overwritten in the destination regardless of the version on the target or the version type you use in the reindex API request. -## Reindex in {{cps}} [reindex-cps] -```{applies_to} -serverless: preview -``` - -When [{{cps}}](docs-content://explore-analyze/cross-project-search.md) is enabled, the [Reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex) can pull documents from indices across linked {{serverless-short}} projects. -The `source.index` field resolves across the origin project and all of its linked projects. -You can narrow the scope of the source using [project routing](docs-content://explore-analyze/cross-project-search/cross-project-search-project-routing.md) or [qualified index expressions](docs-content://explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions). -Documents are always written to the destination index on the origin project. - -There are two ways to reindex in {{cps-init}}: - -* [**Reindex across linked projects**](#reindex-cps-linked): reindex from the origin project and its [linked projects](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md). -* [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. - -### Reindex across linked projects [reindex-cps-linked] - -When not using `source.remote`, the Reindex API pulls documents from the origin project and its linked projects: - -* Only the origin project and projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) to it can be targeted. -* The `source.index` field resolves across the origin project and all linked projects. -* You can use `project_routing` in the `source` section to limit which projects are included. -* Qualified index expressions (for example, `project1:logs`) are supported. - -The following request reindexes documents from the `logs` index, limiting the source to the linked project with alias `project1`: - -```console -POST _reindex -{ - "source": { - "project_routing": "_alias:project1", - "index": "logs" - }, - "dest": { - "index": "new_index" - } -} -``` - -### Reindex from a remote project [reindex-cps-remote] - -When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project. - -The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. - -The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): - -```console -POST _reindex -{ - "source": { - "remote": { - "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", - "api_key": "" - }, - "index": "logs" - }, - "dest": { - "index": "new_index" - } -} -``` - -You can add `project_routing` to the `source` section to limit which of the remote project's linked projects are included. The following request limits the reindex source to the remote project's origin project only: - -```console -POST _reindex -{ - "source": { - "remote": { - "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", - "api_key": "" - }, - "project_routing": "_alias:_origin", - "index": "logs" - }, - "dest": { - "index": "new_index" - } -} -``` - -::::{note} -`project_routing` is not supported when the remote target is an {{ech}} deployment. If you include `project_routing` in a request targeting an {{ech}} deployment, the request returns an error. -:::: - ## Reindex from remote [reindex-from-remote] ```{applies_to} stack: ga @@ -792,7 +706,7 @@ The remote hosts that you can use depend on whether you're using the versioned { The list of allowed hosts must be configured on any node that will coordinate the reindex. -* In {{serverless-full}}, only remote hosts in Elastic Cloud Hosted are allowed. {applies_to}`serverless: preview` +* In {{serverless-full}}, remote hosts in {{ech}} and other {{serverless-short}} projects are allowed. {applies_to}`serverless: preview` ### Compatibility [reindex-remote-compatibility] @@ -876,6 +790,93 @@ These must be specified in the `elasticsearch.yml` file, with the exception of t It is not possible to configure SSL in the body of the reindex API request. Refer to [Reindex settings](/reference/elasticsearch/configuration-reference/index-management-settings.md#reindex-settings). +## Reindex in {{cps}} [reindex-cps] +```{applies_to} +serverless: preview +``` + +When [{{cps}}](docs-content://explore-analyze/cross-project-search.md) is enabled, the [Reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex) can pull documents from indices across linked {{serverless-short}} projects. +The `source.index` field resolves across the origin project and all of its linked projects. +You can narrow the scope of the source using [project routing](docs-content://explore-analyze/cross-project-search/cross-project-search-project-routing.md) or [qualified index expressions](docs-content://explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions). +Documents are always written to the destination index on the origin project. + +There are two ways to use reindex to move data between projects in {{cps-init}}: + +* [**Reindex across linked projects**](#reindex-cps-linked): reindex from the origin project and its [linked projects](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md). +* [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. + +### Reindex across linked projects [reindex-cps-linked] + +When not using `source.remote`, the Reindex API pulls documents from the origin project and its linked projects: + +* Only the origin project and projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) to it can be targeted. +* The `source.index` field resolves across the origin project and all linked projects. +* You can use `project_routing` in the `source` section to limit which projects are included. +* Qualified index expressions (for example, `project1:logs`) are supported. + +The following request reindexes documents from the `logs` index, limiting the source to the linked project with alias `project1`: + +```console +POST _reindex +{ + "source": { + "project_routing": "_alias:project1", + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +### Reindex from a remote project [reindex-cps-remote] + +When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project. + +The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. +For {{cps}} to work on the remote side, you must authenticate with a Cloud API key. A stack API key only provides access to the remote project itself, not its linked projects. + +The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): + +```console +POST _reindex +{ + "source": { + "remote": { + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", + "api_key": "" + }, + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +You can add `project_routing` to the `source` section to limit which of the remote project's linked projects are included. The following request limits the reindex source to the remote project's origin project only: + +```console +POST _reindex +{ + "source": { + "remote": { + "host": "https://my-remote-project.es.us-east-1.aws.elastic.cloud:443", + "api_key": "" + }, + "project_routing": "_alias:_origin", + "index": "logs" + }, + "dest": { + "index": "new_index" + } +} +``` + +::::{note} +`project_routing` is only supported when the remote target is a {{serverless-short}} project. If you include `project_routing` in a request targeting a non-{{serverless-short}} deployment, the request returns an error. +:::: + ## Monitor reindex tasks [monitor-reindex-tasks] When run asynchronously with `wait_for_completion=false`, a reindex task can be monitored with the task management API: From b18381b99cbe71edb0c8e170b4e1e2bc8b921d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Mar 2026 09:34:15 +0100 Subject: [PATCH 06/10] Refine content. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index d85f1dc9e63d8..1a4fbb61b80ee 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -834,7 +834,7 @@ POST _reindex When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project. The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. -For {{cps}} to work on the remote side, you must authenticate with a Cloud API key. A stack API key only provides access to the remote project itself, not its linked projects. +For {{cps}} to work on the remote side, you must authenticate with a Cloud API key. An {{es}} API key only provides access to the remote project itself, not its linked projects. The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): From f4f3b875ac2fcfe619a54a7a9517dbc7ced85f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Wed, 18 Mar 2026 15:46:32 +0100 Subject: [PATCH 07/10] Address feedback. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 1a4fbb61b80ee..f67ca72d5a55e 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -706,7 +706,7 @@ The remote hosts that you can use depend on whether you're using the versioned { The list of allowed hosts must be configured on any node that will coordinate the reindex. -* In {{serverless-full}}, remote hosts in {{ech}} and other {{serverless-short}} projects are allowed. {applies_to}`serverless: preview` +* In {{serverless-full}}, all remote hosts in any {{ecloud}} region are allowed, including {{ech}} deployments and {{serverless-short}} projects. {applies_to}`serverless: preview` ### Compatibility [reindex-remote-compatibility] @@ -803,7 +803,7 @@ Documents are always written to the destination index on the origin project. There are two ways to use reindex to move data between projects in {{cps-init}}: * [**Reindex across linked projects**](#reindex-cps-linked): reindex from the origin project and its [linked projects](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md). -* [**Reindex from a remote project**](#reindex-cps-remote): reindex from a {{serverless-short}} project or {{ech}} deployment that is not linked to the origin project, by specifying `source.remote.host`. +* [**Reindex from a remote project**](#reindex-cps-remote): reindex from another {{serverless-short}} project or an {{ech}} deployment by connecting over HTTP with `source.remote.host`. ### Reindex across linked projects [reindex-cps-linked] @@ -831,10 +831,10 @@ POST _reindex ### Reindex from a remote project [reindex-cps-remote] -When using `source.remote.host`, you can reindex from {{serverless-short}} projects or {{ech}} deployments that are not linked to the origin project. +When using `source.remote.host`, you can reindex from another {{serverless-short}} project or an {{ech}} deployment over HTTP. The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. -For {{cps}} to work on the remote side, you must authenticate with a Cloud API key. An {{es}} API key only provides access to the remote project itself, not its linked projects. +For {{cps}} to work on the remote side, you must authenticate with an [{{ecloud}} API key](docs-content://deploy-manage/api-keys/elastic-cloud-api-keys.md). An [{{es}} API key](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md) only provides access to the remote project itself, not its linked projects. The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): From 6143b0e4aa8ec7abb1910e6a67d74b5890076ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Thu, 19 Mar 2026 09:05:18 +0100 Subject: [PATCH 08/10] More edits. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index f67ca72d5a55e..2faf2a175161b 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -807,7 +807,7 @@ There are two ways to use reindex to move data between projects in {{cps-init}}: ### Reindex across linked projects [reindex-cps-linked] -When not using `source.remote`, the Reindex API pulls documents from the origin project and its linked projects: +When not using [`source.remote`](#reindex-cps-remote), the Reindex API pulls documents from the origin project and its linked projects: * Only the origin project and projects [linked](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md) to it can be targeted. * The `source.index` field resolves across the origin project and all linked projects. @@ -833,7 +833,7 @@ POST _reindex When using `source.remote.host`, you can reindex from another {{serverless-short}} project or an {{ech}} deployment over HTTP. -The `source.index` field on the remote side also resolves across the remote project and all of its linked projects. +When targeting a {{serverless-short}} project, the `source.index` field on the remote side also resolves across the remote project and all of its linked projects. For {{cps}} to work on the remote side, you must authenticate with an [{{ecloud}} API key](docs-content://deploy-manage/api-keys/elastic-cloud-api-keys.md). An [{{es}} API key](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md) only provides access to the remote project itself, not its linked projects. The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): From 62828949b63e42e6c7acad21fb8d38247c88b5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Fri, 20 Mar 2026 15:27:16 +0100 Subject: [PATCH 09/10] Address feedback. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 2faf2a175161b..2ac992bc4ca3e 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -800,7 +800,7 @@ The `source.index` field resolves across the origin project and all of its linke You can narrow the scope of the source using [project routing](docs-content://explore-analyze/cross-project-search/cross-project-search-project-routing.md) or [qualified index expressions](docs-content://explore-analyze/cross-project-search/cross-project-search-search.md#search-expressions). Documents are always written to the destination index on the origin project. -There are two ways to use reindex to move data between projects in {{cps-init}}: +There are two ways to use reindex to move data between {{serverless-short}} projects in {{cps-init}}: * [**Reindex across linked projects**](#reindex-cps-linked): reindex from the origin project and its [linked projects](docs-content://explore-analyze/cross-project-search/cross-project-search-link-projects.md). * [**Reindex from a remote project**](#reindex-cps-remote): reindex from another {{serverless-short}} project or an {{ech}} deployment by connecting over HTTP with `source.remote.host`. @@ -833,7 +833,7 @@ POST _reindex When using `source.remote.host`, you can reindex from another {{serverless-short}} project or an {{ech}} deployment over HTTP. -When targeting a {{serverless-short}} project, the `source.index` field on the remote side also resolves across the remote project and all of its linked projects. +When targeting a {{serverless-short}} project, the `source.index` field on the remote side can also resolve across the remote project and all of its linked projects. For {{cps}} to work on the remote side, you must authenticate with an [{{ecloud}} API key](docs-content://deploy-manage/api-keys/elastic-cloud-api-keys.md). An [{{es}} API key](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md) only provides access to the remote project itself, not its linked projects. The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to): From 7a994c1637738e860246cfdab0d8c2e2861f1b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Fri, 20 Mar 2026 15:51:22 +0100 Subject: [PATCH 10/10] Clarify authentication. --- docs/reference/elasticsearch/rest-apis/reindex-indices.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/elasticsearch/rest-apis/reindex-indices.md b/docs/reference/elasticsearch/rest-apis/reindex-indices.md index 2ac992bc4ca3e..f0a9adc58a919 100644 --- a/docs/reference/elasticsearch/rest-apis/reindex-indices.md +++ b/docs/reference/elasticsearch/rest-apis/reindex-indices.md @@ -832,9 +832,9 @@ POST _reindex ### Reindex from a remote project [reindex-cps-remote] When using `source.remote.host`, you can reindex from another {{serverless-short}} project or an {{ech}} deployment over HTTP. +By default, the reindex operation pulls documents only from the specified remote target. -When targeting a {{serverless-short}} project, the `source.index` field on the remote side can also resolve across the remote project and all of its linked projects. -For {{cps}} to work on the remote side, you must authenticate with an [{{ecloud}} API key](docs-content://deploy-manage/api-keys/elastic-cloud-api-keys.md). An [{{es}} API key](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md) only provides access to the remote project itself, not its linked projects. +If the remote target is a {{cps}}-enabled {{serverless-short}} project, the `source.index` field can also resolve across the remote project and all of its linked projects. For this to work, the request must authenticate with an [{{ecloud}} API key](docs-content://deploy-manage/api-keys/elastic-cloud-api-keys.md) that has **Cloud, Elasticsearch, and Kibana API** access. An [{{es}} API key](docs-content://deploy-manage/api-keys/elasticsearch-api-keys.md) only provides access to the remote project itself, not its linked projects. The following request reindexes documents from the `logs` index on a remote project. The source targets the `logs` index on the remote project and any of its linked projects, but not the `logs` index on the origin project (the project you sent the reindex request to):