Commit b9573b3
authored
Add template_id to patterned-text type (#131401)
For patterned-text mapper foo, add a sub-field called foo.template_id. This is the an 8-byte hash of the template doc_value column. Unlike the template, template_id is accessible and can be used for querying, aggregations, etc. The template_id is stored as a KeywordField and can use any features of the KeyworkFieldType. template_id has doc_values, and is not stored or indexed. It uses doc value skippers, which should be quite fast given that the index will be sorted on template.1 parent 631cbac commit b9573b3
File tree
7 files changed
+420
-41
lines changed- server/src/main/java/org/elasticsearch/index/mapper
- x-pack/plugin/logsdb/src
- main/java/org/elasticsearch/xpack/logsdb/patternedtext
- test/java/org/elasticsearch/xpack/logsdb/patternedtext
- yamlRestTest/resources/rest-api-spec/test/patternedtext
7 files changed
+420
-41
lines changedLines changed: 56 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
| 248 | + | |
246 | 249 | | |
247 | 250 | | |
248 | 251 | | |
| |||
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
258 | | - | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | | - | |
| 300 | + | |
| 301 | + | |
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
303 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
304 | 330 | | |
305 | 331 | | |
306 | 332 | | |
| |||
422 | 448 | | |
423 | 449 | | |
424 | 450 | | |
425 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
426 | 454 | | |
427 | 455 | | |
428 | 456 | | |
| |||
460 | 488 | | |
461 | 489 | | |
462 | 490 | | |
463 | | - | |
464 | 491 | | |
465 | 492 | | |
466 | 493 | | |
467 | 494 | | |
468 | 495 | | |
469 | 496 | | |
470 | | - | |
471 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
472 | 501 | | |
473 | 502 | | |
474 | 503 | | |
475 | 504 | | |
476 | 505 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
481 | 515 | | |
482 | 516 | | |
483 | 517 | | |
| |||
1088 | 1122 | | |
1089 | 1123 | | |
1090 | 1124 | | |
1091 | | - | |
| 1125 | + | |
| 1126 | + | |
1092 | 1127 | | |
1093 | 1128 | | |
1094 | 1129 | | |
| |||
1099 | 1134 | | |
1100 | 1135 | | |
1101 | 1136 | | |
1102 | | - | |
1103 | 1137 | | |
1104 | 1138 | | |
1105 | 1139 | | |
| |||
1120 | 1154 | | |
1121 | 1155 | | |
1122 | 1156 | | |
1123 | | - | |
| 1157 | + | |
| 1158 | + | |
1124 | 1159 | | |
1125 | 1160 | | |
1126 | 1161 | | |
| |||
1219 | 1254 | | |
1220 | 1255 | | |
1221 | 1256 | | |
1222 | | - | |
| 1257 | + | |
1223 | 1258 | | |
1224 | 1259 | | |
1225 | 1260 | | |
| |||
1276 | 1311 | | |
1277 | 1312 | | |
1278 | 1313 | | |
1279 | | - | |
| 1314 | + | |
| 1315 | + | |
1280 | 1316 | | |
1281 | 1317 | | |
1282 | 1318 | | |
1283 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1284 | 1324 | | |
1285 | 1325 | | |
1286 | 1326 | | |
| |||
Lines changed: 63 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| |||
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
53 | | - | |
| 62 | + | |
54 | 63 | | |
55 | | - | |
56 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
57 | 76 | | |
58 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
59 | 84 | | |
60 | 85 | | |
| 86 | + | |
61 | 87 | | |
62 | 88 | | |
63 | 89 | | |
64 | 90 | | |
65 | 91 | | |
66 | 92 | | |
| 93 | + | |
67 | 94 | | |
68 | 95 | | |
69 | 96 | | |
| |||
87 | 114 | | |
88 | 115 | | |
89 | 116 | | |
90 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
91 | 126 | | |
92 | 127 | | |
93 | 128 | | |
94 | | - | |
| 129 | + | |
95 | 130 | | |
96 | 131 | | |
97 | 132 | | |
| 133 | + | |
98 | 134 | | |
| 135 | + | |
99 | 136 | | |
100 | 137 | | |
| 138 | + | |
101 | 139 | | |
102 | 140 | | |
103 | 141 | | |
104 | 142 | | |
105 | 143 | | |
106 | | - | |
| 144 | + | |
| 145 | + | |
107 | 146 | | |
108 | 147 | | |
109 | 148 | | |
| |||
112 | 151 | | |
113 | 152 | | |
114 | 153 | | |
| 154 | + | |
| 155 | + | |
115 | 156 | | |
| 157 | + | |
116 | 158 | | |
117 | 159 | | |
118 | 160 | | |
| |||
122 | 164 | | |
123 | 165 | | |
124 | 166 | | |
125 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
126 | 179 | | |
127 | 180 | | |
128 | 181 | | |
| |||
146 | 199 | | |
147 | 200 | | |
148 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
149 | 205 | | |
150 | 206 | | |
151 | 207 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
| |||
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
20 | 38 | | |
21 | 39 | | |
22 | 40 | | |
| |||
0 commit comments