Conversation
Vale Linting ResultsSummary: 1 warning found
|
| File | Line | Rule | Message |
|---|---|---|---|
| explore-analyze/cross-project-search.md | 361 | Elastic.QuotesPunctuation | Place punctuation inside closing quotation marks. |
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.
🔍 Preview links for changed docs |
| * more complex project_routing examples | ||
| * qualified search expressions and project_routing | ||
| --> | ||
| The following examples demonstrate how search requests behave in different cross-project scenarios in {{cps-init}}. |
There was a problem hiding this comment.
nit: I think this will read as:
in different cross-project scenarios in Cross-project search
which seems a little redudant?
Maybe:
in different {{cps-init}} scenarios
| POST /_query | ||
| { | ||
| "query": "FROM my-index", | ||
| "include_ccs_metadata": true |
There was a problem hiding this comment.
Change include_ccs_metadata to include_execution_metadata. Sorry, I used the wrong one in my examples to you.
include_ccs_metadata is (unofficially) deprecated - we don't want to use it for two reasons:
- it has "ccs" in it so confusing if it applies to cps
include_execution_metadatawill include execution metadata even for queries that are origin-only, whereasinclude_ccs_metadatawill not
| GET /_query | ||
| { | ||
| "query": "SET project_routing=\"_alias:lin*\"; FROM * METADATA _index", | ||
| "include_ccs_metadata":true |
There was a problem hiding this comment.
Change include_ccs_metadata to include_execution_metadata.
| { | ||
| "project_routing": "@origin-only", | ||
| "query": "FROM *", | ||
| "include_ccs_metadata": true, |
There was a problem hiding this comment.
Change include_ccs_metadata to include_execution_metadata.
|
|
||
| The requests explicitly target all projects using the `*:` prefix. | ||
| The `my-index` index is evaluated separately in each project. | ||
| The search runs only in projects where the `my-index` index exists. |
There was a problem hiding this comment.
The search runs only in projects where the
my-indexindex exists.
That's not true for qualified expressions. When you specify *:my-index, that index (or alias or datastream) must be present on every project, otherwise an error will be thrown:
Here's a case where the "logs" index exists on the linked project but not on the origin project:
$ ▶ curl -X POST --url 'http://localhost:9200/*:logs/_search' --header 'Authorization: ApiKey essu_dev_xxxx' | jq .
{
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [*:logs]",
"index_uuid": "_na_",
"index": "*:logs"
}
],
"type": "index_not_found_exception",
"reason": "no such index [*:logs]",
"index_uuid": "_na_",
"index": "*:logs"
},
"status": 404
}
Summary
Relates to https://github.com/elastic/docs-content-internal/issues/31
This PR adds CPS examples to the CPS overview page.
Generative AI disclosure
Tool(s) and model(s) used: gpt 5.2 in Codex