Commit 9e6fcf6
authored
Fix timestamp range query optimization for indices with doc values skipper (#123930)
When running a timestamp range query, as an optimization we check if the
query range overlaps with the total range of values within a shard before
executing the query on that shard. That way, if the range is disjoint, we
can skip execution for that shard. To get the range of values within a
shard, we usually use the PointValues index on the shard. However, when the
doc values skipper is enabled, the point values are not (as the reason for
the skipper is to reduce storage overhead by removing the point values
index). In this case, we need to instead get the range of values within the
shard by using the skipper. This patch implements that logic.
Follow-up to #1231911 parent 1637303 commit 9e6fcf6
File tree
3 files changed
+71
-4
lines changed- server/src
- internalClusterTest/java/org/elasticsearch/index/shard
- main/java/org/elasticsearch/index/mapper
- test/java/org/elasticsearch/index/mapper
3 files changed
+71
-4
lines changedLines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
238 | 247 | | |
239 | 248 | | |
240 | 249 | | |
| |||
259 | 268 | | |
260 | 269 | | |
261 | 270 | | |
262 | | - | |
| 271 | + | |
263 | 272 | | |
264 | 273 | | |
265 | 274 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
827 | 829 | | |
828 | 830 | | |
829 | 831 | | |
830 | | - | |
831 | | - | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
832 | 850 | | |
833 | 851 | | |
834 | 852 | | |
| |||
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
85 | 86 | | |
86 | 87 | | |
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 | + | |
88 | 123 | | |
89 | 124 | | |
90 | 125 | | |
91 | 126 | | |
92 | 127 | | |
93 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
94 | 134 | | |
95 | 135 | | |
96 | 136 | | |
| |||
0 commit comments