…the help menu (#223602) (#224174)
# Backport
This will backport the following commits from `main` to `8.19`:
- [[Unified search] Display the solutions recommended queries in the
help menu (#223602)](#223602)
<!--- Backport version: 10.0.0 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2025-06-13T04:22:45Z","message":"[Unified
search] Display the solutions recommended queries in the help menu
(#223602)\n\n## Summary\n\nReopening of
https://github.com/elastic/kibana/pull/223362\n\nIn
#221474 we introduced
the\nmechanism to register queries per solution at the editor.\n\nThis
PR displays these queries in the unified search menu too. In
the\nfollowing screenshot the 2 first queries are the oblt
solution\nregistered queries. I also have a max-height just to be sure
that this\nlist doesnt get too long now that the solutions can register
queries.\n\n<img width=\"439\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8ca48b8a-1880-42f3-944f-dd1fb012661f\"\n/>\n\n###
Note\n\nThis change won't display anything in the popover as no solution
has\nregistered any queries yet. This PR sets the mechanism though on
when\nthey will do so.\n\n### How to test\nIf you want to test it the
fastest way is to go to the esql plugin\n(server side) and add (change
the examples as you
wish):\n\n```\nthis.extensionsRegistry.setRecommendedQueries(\n [\n {\n
name: 'Logs count by log level',\n query: 'from logs* | STATS count(*)
by log_level',\n },\n {\n name: 'Apache logs counts',\n query: 'from
logs-apache_error | STATS count(*)',\n },\n {\n name: 'Another index,
not logs',\n query: 'from movies | STATS count(*)',\n },\n ],\n 'oblt'\n
);\n\n```\nThen go to Discover (solutions mode) and type `from logs*`
and hit the\nquery. Open the popover and check the 2 first
recommendations are been\nsuggested.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n\n\n\n\n\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"563abe2cac151f59162639658ba4a3017d15cfb1","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[Unified
search] Display the solutions recommended queries in the help
menu","number":223602,"url":"https://github.com/elastic/kibana/pull/223602","mergeCommit":{"message":"[Unified
search] Display the solutions recommended queries in the help menu
(#223602)\n\n## Summary\n\nReopening of
https://github.com/elastic/kibana/pull/223362\n\nIn
#221474 we introduced
the\nmechanism to register queries per solution at the editor.\n\nThis
PR displays these queries in the unified search menu too. In
the\nfollowing screenshot the 2 first queries are the oblt
solution\nregistered queries. I also have a max-height just to be sure
that this\nlist doesnt get too long now that the solutions can register
queries.\n\n<img width=\"439\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8ca48b8a-1880-42f3-944f-dd1fb012661f\"\n/>\n\n###
Note\n\nThis change won't display anything in the popover as no solution
has\nregistered any queries yet. This PR sets the mechanism though on
when\nthey will do so.\n\n### How to test\nIf you want to test it the
fastest way is to go to the esql plugin\n(server side) and add (change
the examples as you
wish):\n\n```\nthis.extensionsRegistry.setRecommendedQueries(\n [\n {\n
name: 'Logs count by log level',\n query: 'from logs* | STATS count(*)
by log_level',\n },\n {\n name: 'Apache logs counts',\n query: 'from
logs-apache_error | STATS count(*)',\n },\n {\n name: 'Another index,
not logs',\n query: 'from movies | STATS count(*)',\n },\n ],\n 'oblt'\n
);\n\n```\nThen go to Discover (solutions mode) and type `from logs*`
and hit the\nquery. Open the popover and check the 2 first
recommendations are been\nsuggested.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n\n\n\n\n\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"563abe2cac151f59162639658ba4a3017d15cfb1"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223602","number":223602,"mergeCommit":{"message":"[Unified
search] Display the solutions recommended queries in the help menu
(#223602)\n\n## Summary\n\nReopening of
https://github.com/elastic/kibana/pull/223362\n\nIn
#221474 we introduced
the\nmechanism to register queries per solution at the editor.\n\nThis
PR displays these queries in the unified search menu too. In
the\nfollowing screenshot the 2 first queries are the oblt
solution\nregistered queries. I also have a max-height just to be sure
that this\nlist doesnt get too long now that the solutions can register
queries.\n\n<img width=\"439\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8ca48b8a-1880-42f3-944f-dd1fb012661f\"\n/>\n\n###
Note\n\nThis change won't display anything in the popover as no solution
has\nregistered any queries yet. This PR sets the mechanism though on
when\nthey will do so.\n\n### How to test\nIf you want to test it the
fastest way is to go to the esql plugin\n(server side) and add (change
the examples as you
wish):\n\n```\nthis.extensionsRegistry.setRecommendedQueries(\n [\n {\n
name: 'Logs count by log level',\n query: 'from logs* | STATS count(*)
by log_level',\n },\n {\n name: 'Apache logs counts',\n query: 'from
logs-apache_error | STATS count(*)',\n },\n {\n name: 'Another index,
not logs',\n query: 'from movies | STATS count(*)',\n },\n ],\n 'oblt'\n
);\n\n```\nThen go to Discover (solutions mode) and type `from logs*`
and hit the\nquery. Open the popover and check the 2 first
recommendations are been\nsuggested.\n\n### Checklist\n\n- [ ] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n\n\n\n\n\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"563abe2cac151f59162639658ba4a3017d15cfb1"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Summary
Reopening of #223362
In #221474 we introduced the mechanism to register queries per solution at the editor.
This PR displays these queries in the unified search menu too. In the following screenshot the 2 first queries are the oblt solution registered queries. I also have a max-height just to be sure that this list doesnt get too long now that the solutions can register queries.
Note
This change won't display anything in the popover as no solution has registered any queries yet. This PR sets the mechanism though on when they will do so.
How to test
If you want to test it the fastest way is to go to the esql plugin (server side) and add (change the examples as you wish):
Then go to Discover (solutions mode) and type
from logs*and hit the query. Open the popover and check the 2 first recommendations are been suggested.Checklist