Commit b75aac6
# 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":"krzysztof.kowalczyk@elastic.co"},"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 <krzysztof.kowalczyk@elastic.co>
1 parent 74b1ca6 commit b75aac6
3 files changed
Lines changed: 124 additions & 12 deletions
File tree
- x-pack/plugins/global_search_bar/public
- components
- search_syntax
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
Lines changed: 78 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
79 | 149 | | |
Lines changed: 45 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
20 | 52 | | |
21 | 53 | | |
22 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
23 | 65 | | |
24 | | - | |
| 66 | + | |
25 | 67 | | |
26 | 68 | | |
27 | 69 | | |
| |||
42 | 84 | | |
43 | 85 | | |
44 | 86 | | |
45 | | - | |
| 87 | + | |
46 | 88 | | |
47 | 89 | | |
48 | 90 | | |
| |||
0 commit comments