Commit 0791f93
authored
Add an option to split keyword field on whitespace at query time (#30691)
This change adds an option named `split_queries_on_whitespace` to the `keyword`
field type. When set to true full text queries (`match`, `multi_match`, `query_string`, ...) that target the field will split the input on whitespace to build the query terms. Defaults to `false`.
Closes #303931 parent cea3c28 commit 0791f93
File tree
11 files changed
+227
-27
lines changed- docs/reference/mapping/types
- server/src
- main/java/org/elasticsearch
- cluster/metadata
- index
- analysis
- mapper
- search
- test/java/org/elasticsearch/index
- analysis
- mapper
- search
- test/framework/src/main/java/org/elasticsearch/index/engine
11 files changed
+227
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
| 457 | + | |
456 | 458 | | |
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
462 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
463 | 467 | | |
464 | 468 | | |
465 | 469 | | |
| |||
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | | - | |
| 496 | + | |
493 | 497 | | |
494 | 498 | | |
495 | 499 | | |
| |||
545 | 549 | | |
546 | 550 | | |
547 | 551 | | |
548 | | - | |
| 552 | + | |
| 553 | + | |
549 | 554 | | |
550 | 555 | | |
551 | | - | |
| 556 | + | |
552 | 557 | | |
553 | 558 | | |
554 | 559 | | |
555 | 560 | | |
556 | | - | |
| 561 | + | |
557 | 562 | | |
558 | 563 | | |
559 | 564 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
Lines changed: 54 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
117 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
118 | 144 | | |
119 | 145 | | |
120 | 146 | | |
| |||
147 | 173 | | |
148 | 174 | | |
149 | 175 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 176 | + | |
155 | 177 | | |
156 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
157 | 182 | | |
158 | 183 | | |
159 | 184 | | |
| |||
163 | 188 | | |
164 | 189 | | |
165 | 190 | | |
| 191 | + | |
166 | 192 | | |
167 | 193 | | |
168 | 194 | | |
| |||
172 | 198 | | |
173 | 199 | | |
174 | 200 | | |
| 201 | + | |
175 | 202 | | |
176 | 203 | | |
177 | 204 | | |
| |||
183 | 210 | | |
184 | 211 | | |
185 | 212 | | |
186 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
187 | 216 | | |
188 | 217 | | |
189 | 218 | | |
| |||
197 | 226 | | |
198 | 227 | | |
199 | 228 | | |
200 | | - | |
| 229 | + | |
201 | 230 | | |
202 | 231 | | |
203 | 232 | | |
| |||
214 | 243 | | |
215 | 244 | | |
216 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
217 | 255 | | |
218 | 256 | | |
219 | 257 | | |
| |||
263 | 301 | | |
264 | 302 | | |
265 | 303 | | |
266 | | - | |
| 304 | + | |
| 305 | + | |
267 | 306 | | |
268 | 307 | | |
269 | 308 | | |
| |||
366 | 405 | | |
367 | 406 | | |
368 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
369 | 412 | | |
370 | 413 | | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
| 266 | + | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
0 commit comments