Skip to content

CPS: Data views automatically list indices from linked projects#5426

Merged
florent-leborgne merged 8 commits intocps-tech-previewfrom
cps/687-data-views-cps
Mar 23, 2026
Merged

CPS: Data views automatically list indices from linked projects#5426
florent-leborgne merged 8 commits intocps-tech-previewfrom
cps/687-data-views-cps

Conversation

@florent-leborgne
Copy link
Contributor

@florent-leborgne florent-leborgne commented Mar 10, 2026

Summary

Adds a "Use data sources with CPS" section to the data views page (data-views.md), explaining how data views interact with cross-project search:

  • When CPS is active, the data view creation form previews matching indices from linked projects based on the current CPS scope.
  • The data view itself does not store the CPS scope — at query time, the active scope determines which linked projects are searched.
  • Users can restrict scope using qualified expressions in the index pattern (e.g. project_alpha:logs-*, _origin:logs-*), or project routing in queries.

Positioned after the existing CCS section as the serverless equivalent.

Closes elastic/docs-content-internal#687

Test plan

  • Verify the page builds correctly at explore-analyze/find-and-organize/data-views
  • Confirm applies_to tags render properly (serverless preview / stack unavailable)
  • Check cross-links to CPS pages resolve correctly

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: Claude (Cursor)

Add a new section explaining that when CPS is active, the data view
creation form automatically lists indices from linked projects based
on the current CPS scope, with no opt-in required.

Closes #687

Made-with: Cursor
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

…lified expressions

- Index listing from linked projects only works from CPS-enabled apps
  (Discover, Dashboards, Lens, Maps), not from Stack Management
- Add note about Stack Management limitation
- Incorporate qualified expressions content (from MW's config PR)
- Add link to search expressions reference

Made-with: Cursor
@florent-leborgne florent-leborgne marked this pull request as ready for review March 13, 2026 18:13
@florent-leborgne florent-leborgne requested review from a team as code owners March 13, 2026 18:13
@florent-leborgne
Copy link
Contributor Author

Hey @mbondyra - I checked this against the instance that you provided. Let me know if that looks accurate to you or if there are things you'd change/clarify.

Note: this will be merged to a feature branch first, that we'll promote on release day

stack: unavailable
```

When [{{cps}}](/explore-analyze/cross-project-search.md) is enabled and you have [linked projects](/explore-analyze/cross-project-search/cross-project-search-link-projects.md), the {{data-source}} creation form lists indices from linked projects based on the current [{{cps}} scope](/explore-analyze/cross-project-search/cross-project-search-manage-scope.md#cps-in-kibana). This applies when you create a {{data-source}} from within a {{cps}}-enabled app such as Discover, Dashboards, Lens, or Maps. The index list updates automatically when you change the {{cps}} scope.
Copy link
Contributor

@mbondyra mbondyra Mar 16, 2026

Choose a reason for hiding this comment

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

optional: i'd maybe make it more clear that it's just a preview and the cps selection doesn't change what indices data view contains at the moment of creation. It is said here, but I feel like it still can be confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha very good point I'll make that clearer!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 39f8a1f - it was indeed not clear enough at all

An index pattern like `logs-*` matches indices across the origin project and all linked projects in scope.

:::{note}
When you create a {{data-source}} from **Stack Management > Data Views**, the {{cps}} scope selector is not available and only indices from the current project are listed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this is not accurate anymore - I was asked to add it (elastic/kibana#257801) - we can remove this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! Done in 39f8a1f


To restrict a {{data-source}} to specific projects, you can:

* **Adjust the {{cps}} scope** in the {{cps-init}} scope selector before creating the {{data-source}}.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not accurate because what cps scope we have at the moment of creating data view doesn't matter, because it's just a preview, data view doesn't hold cps scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good point, this should be fixed with 39f8a1f

- Clarify that the creation form shows a preview of indices based on
  the current CPS scope, but the data view itself does not store the
  scope
- Remove outdated Stack Management note (CPS now supported there)
- Remove misleading "adjust CPS scope" bullet (scope at creation time
  is only a preview)

Made-with: Cursor
@florent-leborgne florent-leborgne merged commit 3338a8d into cps-tech-preview Mar 23, 2026
7 checks passed
@florent-leborgne florent-leborgne deleted the cps/687-data-views-cps branch March 23, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants