Commit 24a24d0
authored
This implements the `fields` API in `_search` for runtime fields using
doc values. Most of that implementation is stolen from the
`docvalue_fields` fetch sub-phase, just moved into the same API that the
`fields` API uses. At this point the `docvalue_fields` fetch phase looks
like a special case of the `fields` API.
While I was at it I moved the "which doc values sub-implementation
should I use for fetching?" question from a bunch of `instanceof`s to a
method on `LeafFieldData` so we can be much more flexible with what is
returned and we're not forced to extend certain classes just to make the
fetch phase happy.
Relates to #59332
1 parent f94ae7a commit 24a24d0
File tree
109 files changed
+699
-349
lines changed- modules
- mapper-extras/src
- main/java/org/elasticsearch/index/mapper
- test/java/org/elasticsearch/index/mapper
- yamlRestTest/resources/rest-api-spec/test/scaled_float
- parent-join/src/main/java/org/elasticsearch/join/mapper
- percolator/src
- main/java/org/elasticsearch/percolator
- test/java/org/elasticsearch/percolator
- plugins
- analysis-icu/src
- main/java/org/elasticsearch/index/mapper
- test/java/org/elasticsearch/index/mapper
- mapper-annotated-text/src
- internalClusterTest/java/org/elasticsearch/index/mapper/annotatedtext
- main/java/org/elasticsearch/index/mapper/annotatedtext
- mapper-murmur3/src/main/java/org/elasticsearch/index/mapper/murmur3
- rest-api-spec/src/main/resources/rest-api-spec/test/search
- server/src
- internalClusterTest/java/org/elasticsearch/search/fetch
- main/java/org/elasticsearch
- index
- fielddata
- plain
- mapper
- query
- search
- aggregations/metrics
- fetch
- subphase
- highlight
- internal
- lookup
- test/java/org/elasticsearch
- index/mapper
- search/fetch/subphase
- test/framework/src/main/java/org/elasticsearch
- index/mapper
- search/aggregations
- test
- x-pack/plugin
- analytics/src/main/java/org/elasticsearch/xpack/analytics/mapper
- async-search/src/test/java/org/elasticsearch/xpack/search
- mapper-constant-keyword/src
- internalClusterTest/java/org/elasticsearch/xpack/constantkeyword/mapper
- main/java/org/elasticsearch/xpack/constantkeyword/mapper
- mapper-flattened/src
- internalClusterTest/java/org/elasticsearch/xpack/flattened/mapper
- main/java/org/elasticsearch/xpack/flattened/mapper
- runtime-fields
- qa/rest
- src/main/java/org/elasticsearch/xpack/runtimefields/mapper
- spatial/src/internalClusterTest/java/org/elasticsearch/xpack/spatial/index/mapper
- src/test/resources/rest-api-spec/test/runtime_fields
- vectors/src/main/java/org/elasticsearch/xpack/vectors/mapper
- wildcard/src
- main/java/org/elasticsearch/xpack/wildcard/mapper
- test/java/org/elasticsearch/xpack/wildcard/mapper
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
109 files changed
+699
-349
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
548 | 568 | | |
549 | 569 | | |
modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
422 | | - | |
| 423 | + | |
423 | 424 | | |
424 | 425 | | |
425 | 426 | | |
| |||
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
468 | | - | |
| 469 | + | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| |||
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
591 | | - | |
| 592 | + | |
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments