Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ For more details about {{cps-init}} configuration, refer to [](/deploy-manage/cr

- **User permissions:** {{cps-cap}} results are filtered by each user's role assignments across projects. Users with different roles will see different results from the same query. Refer to [Manage user access](/deploy-manage/cross-project-search-config/cps-config-access-and-scope.md#manage-user-access).

- **{{product.painless}} scripting:** The [{{product.painless}} execute API](/explore-analyze/cross-project-search.md#cps-painless-execute) does not search across linked projects. It resolves index names against the origin project only. You can target a linked project by prefixing the index with the project alias (for example, `projectAlias:myindex`).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marciw Out of curiousity, do happen to know where {{product.painless}} is defined? I know that it works, but I'm surprised not to see it in docs-content/docset.yml.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Limitations [cps-limitations]

::::{include} /deploy-manage/_snippets/cps-limitations-core.md
Expand Down
14 changes: 14 additions & 0 deletions explore-analyze/cross-project-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@
* Search scroll [clear](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-clear-scroll), [run](https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-scroll)
* [Search template](/solutions/search/search-templates.md)

### {{product.painless}} scripting [cps-painless-scripting]

The [{{product.painless}} execute API](elasticsearch://reference/scripting-languages/painless/painless-api-examples.md) (`POST _scripts/painless/_execute`) does not search across linked projects. Unlike the search APIs listed above, the execute API resolves index names against the **origin project only**.

When testing scripts with the execute API in a {{cps}} environment:

Check notice on line 157 in explore-analyze/cross-project-search.md

View workflow job for this annotation

GitHub Actions / build / vale

Elastic.WordChoice: Consider using 'run, start' instead of 'execute', unless the term is in the UI.

* To target a specific linked project, prefix the index with the project alias: `projectAlias:myindex`.
* To explicitly target the origin project, use `_origin:myindex`.
* An unqualified index name like `logs` is equivalent to `_origin:logs` — it targets the origin project only.
* Only a single index is accepted. Wildcards and [project routing](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) are not supported.
* Requests to linked projects are subject to the same [security model](/explore-analyze/cross-project-search.md#security) as other {{cps}} requests.

For additional information, refer to the [{{product.painless}} execute API reference](elasticsearch://reference/scripting-languages/painless/painless-api-examples.md).

Check notice on line 165 in explore-analyze/cross-project-search.md

View workflow job for this annotation

GitHub Actions / build / vale

Elastic.WordChoice: Consider using 'run, start' instead of 'execute', unless the term is in the UI.

<!--
### {{cps-cap}} specific APIs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Not all apps support {{cps}}. The following table shows which apps support the {
| --- | --- | --- |
| **Agent Builder** | Not available | ES\|QL |
| **Dashboards** | Editable | Per-panel overrides using ES\|QL visualizations or Maps layer routing. Dashboards can also [store a {{cps}} scope](/explore-analyze/dashboards/using.md#dashboard-cps-scope). |
| **Dev Tools / Console** | Not available | Full CPS through raw API requests, including ES\|QL |
| **Dev Tools / Console** | Not available | Full {{cps-init}} through raw API requests, including ES\|QL. The [{{product.painless}} execute API](/explore-analyze/cross-project-search.md#cps-painless-scripting) resolves index names differently. |
| **Discover** | Editable | ES\|QL |
| **Lens visualizations** | Editable | ES\|QL visualizations[^cps-badge] |
| **Maps** | Editable | Layer-level [project routing](/explore-analyze/cross-project-search/cross-project-search-project-routing.md) for vector layers and joins |
Expand Down
Loading