Commit 385b97f
authored
Choose postings format from FieldMapper instead of MappedFieldType (#77234)
Currently we configure per-field postings formats by asking the MapperService
for the MappedFieldType of the field in question, and then checking to see if it
is a completion field. If no MappedFieldType is available, we emit a warning.
However, MappedFieldTypes are for search fields only, and so we end up emitting
warnings for hidden sub-fields that have no corresponding field type, such as
prefix or phrase accelerator fields on text mappers.
This commit reworks things so that the MappingLookup is responsible for defining
per-field postings formats, and will detect CompletionFieldMappers at build time.
All fields that are not mapped to a completion field will just get the default postings
format. This also means that we no longer need a logger instance on CodecService.
Fixes #771831 parent f18b9d5 commit 385b97f
File tree
14 files changed
+67
-62
lines changed- server/src
- internalClusterTest/java/org/elasticsearch/indices
- main/java/org/elasticsearch/index
- codec
- mapper
- shard
- test/java/org/elasticsearch
- index
- codec
- engine
- mapper
- shard
- indices
- test/framework/src/main/java/org/elasticsearch/index/engine
- x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/index/engine
14 files changed
+67
-62
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | | - | |
| 28 | + | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
| |||
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
| 38 | + | |
42 | 39 | | |
43 | 40 | | |
44 | | - | |
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
54 | 48 | | |
55 | | - | |
| 49 | + | |
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
213 | | - | |
214 | 211 | | |
215 | 212 | | |
216 | 213 | | |
| |||
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 236 | | |
250 | 237 | | |
251 | 238 | | |
| |||
313 | 300 | | |
314 | 301 | | |
315 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
316 | 307 | | |
317 | 308 | | |
318 | 309 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| |||
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
216 | 230 | | |
217 | 231 | | |
218 | 232 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2603 | 2603 | | |
2604 | 2604 | | |
2605 | 2605 | | |
2606 | | - | |
| 2606 | + | |
2607 | 2607 | | |
2608 | 2608 | | |
2609 | 2609 | | |
| |||
2935 | 2935 | | |
2936 | 2936 | | |
2937 | 2937 | | |
2938 | | - | |
| 2938 | + | |
2939 | 2939 | | |
2940 | 2940 | | |
2941 | 2941 | | |
| |||
6018 | 6018 | | |
6019 | 6019 | | |
6020 | 6020 | | |
6021 | | - | |
| 6021 | + | |
6022 | 6022 | | |
6023 | 6023 | | |
6024 | 6024 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3924 | 3924 | | |
3925 | 3925 | | |
3926 | 3926 | | |
3927 | | - | |
| 3927 | + | |
3928 | 3928 | | |
3929 | 3929 | | |
3930 | 3930 | | |
| |||
0 commit comments