Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Global Search] Add multiword type handling in global search (#…
…196087) (#196545) # Backport This will backport the following commits from `main` to `8.x`: - [[Global Search] Add multiword type handling in global search (#196087)](#196087) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Krzysztof Kowalczyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T12:29:03Z","message":"[Global Search] Add multiword type handling in global search (#196087)\n\n## Summary\r\n\r\nThis PR improves the UX of global search by allowing users to search for\r\ntypes that consist of multiple words without having to turn them into\r\nphrases (wrapping them in quotes).\r\n\r\nFor example: \r\n\r\nThe following query:\r\n```\r\nhello type:canvas workpad type:enterprise search world tag:new\r\n```\r\nWill get mapped to:\r\n```\r\nhello type:\"canvas workpad\" type:\"enterprise search\" world tag:new\r\n```\r\nWhich will result in following `Query` object:\r\n```json\r\n{\r\n \"term\": \"hello world\",\r\n \"filters\": {\r\n \"tags\": [\"new\"]\r\n \"types\": [\"canvas workpad\", \"enterprise search\"],\r\n },\r\n}\r\n```\r\n\r\nFixes: #176877\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"3d28d173a94dc9856fe43cbff8d88ac4e2d42a17","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[Global Search] Add multiword type handling in global search","number":196087,"url":"https://github.com/elastic/kibana/pull/196087","mergeCommit":{"message":"[Global Search] Add multiword type handling in global search (#196087)\n\n## Summary\r\n\r\nThis PR improves the UX of global search by allowing users to search for\r\ntypes that consist of multiple words without having to turn them into\r\nphrases (wrapping them in quotes).\r\n\r\nFor example: \r\n\r\nThe following query:\r\n```\r\nhello type:canvas workpad type:enterprise search world tag:new\r\n```\r\nWill get mapped to:\r\n```\r\nhello type:\"canvas workpad\" type:\"enterprise search\" world tag:new\r\n```\r\nWhich will result in following `Query` object:\r\n```json\r\n{\r\n \"term\": \"hello world\",\r\n \"filters\": {\r\n \"tags\": [\"new\"]\r\n \"types\": [\"canvas workpad\", \"enterprise search\"],\r\n },\r\n}\r\n```\r\n\r\nFixes: #176877\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"3d28d173a94dc9856fe43cbff8d88ac4e2d42a17"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196087","number":196087,"mergeCommit":{"message":"[Global Search] Add multiword type handling in global search (#196087)\n\n## Summary\r\n\r\nThis PR improves the UX of global search by allowing users to search for\r\ntypes that consist of multiple words without having to turn them into\r\nphrases (wrapping them in quotes).\r\n\r\nFor example: \r\n\r\nThe following query:\r\n```\r\nhello type:canvas workpad type:enterprise search world tag:new\r\n```\r\nWill get mapped to:\r\n```\r\nhello type:\"canvas workpad\" type:\"enterprise search\" world tag:new\r\n```\r\nWhich will result in following `Query` object:\r\n```json\r\n{\r\n \"term\": \"hello world\",\r\n \"filters\": {\r\n \"tags\": [\"new\"]\r\n \"types\": [\"canvas workpad\", \"enterprise search\"],\r\n },\r\n}\r\n```\r\n\r\nFixes: #176877\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"3d28d173a94dc9856fe43cbff8d88ac4e2d42a17"}}]}] BACKPORT--> Co-authored-by: Krzysztof Kowalczyk <[email protected]>
- Loading branch information