Commit fbb8356
Good "git" signature for 814238703@qq.com with RSA key SHA256:8Li5axUHZa2go6d/A0gwctfIE5roEODtAGYqfTLwFkg
Add from and size parameters to terms lookup query for pagination support
This change adds support for pagination in terms lookup queries, allowing
users to specify from and size parameters to control which terms are fetched
from the lookup index. This is useful when dealing with large lookup datasets
and wanting to paginate through the results.
Changes:
- Add from and size fields to TermsLookup class
- Update TermsLookup serialization and XContent parsing
- Modify TermsQueryBuilder.fetch() to use from/size parameters
- Add YAML REST test cases for the new functionality
Example usage:
{
"terms": {
"user": {
"index": "lookup_index",
"path": "followers",
"query": { "term": { "group": "g1" } },
"from": 10,
"size": 100
}
}
}
Signed-off-by: Shawn Qiang <814238703@qq.com>
Co-authored-by: OpenCode <support@opencode.ai>
Signed-off-by: Shawn Qiang <814238703@qq.com>1 parent 9c29462 commit fbb8356
File tree
4 files changed
+138
-4
lines changed- rest-api-spec/src/main/resources/rest-api-spec/test/search
- server/src/main/java/org/opensearch
- index/query
- indices
4 files changed
+138
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
620 | 630 | | |
621 | 631 | | |
622 | 632 | | |
| |||
Lines changed: 55 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
| |||
134 | 146 | | |
135 | 147 | | |
136 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
| |||
176 | 192 | | |
177 | 193 | | |
178 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
179 | 219 | | |
180 | 220 | | |
181 | 221 | | |
| |||
189 | 229 | | |
190 | 230 | | |
191 | 231 | | |
| 232 | + | |
| 233 | + | |
192 | 234 | | |
193 | 235 | | |
194 | 236 | | |
| |||
199 | 241 | | |
200 | 242 | | |
201 | 243 | | |
202 | | - | |
| 244 | + | |
203 | 245 | | |
204 | 246 | | |
205 | 247 | | |
| |||
212 | 254 | | |
213 | 255 | | |
214 | 256 | | |
| 257 | + | |
| 258 | + | |
215 | 259 | | |
216 | 260 | | |
217 | 261 | | |
| |||
239 | 283 | | |
240 | 284 | | |
241 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
242 | 292 | | |
243 | 293 | | |
244 | 294 | | |
| |||
247 | 297 | | |
248 | 298 | | |
249 | 299 | | |
250 | | - | |
| 300 | + | |
251 | 301 | | |
252 | 302 | | |
253 | 303 | | |
| |||
264 | 314 | | |
265 | 315 | | |
266 | 316 | | |
267 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
268 | 320 | | |
269 | 321 | | |
0 commit comments