Commit 84543f6
committed
Match episode pairs in ES query, reduce size
Build per-episode (season, episode) bool SHOULD clauses instead of a broad season-only TERMS filter. Ignore entries missing either season or episode and return early if none are valid. Wrap the SHOULD clauses in a FILTER with minimum_should_match=1. Also reduce the Elasticsearch result size from 100000 to 10000 to limit returned hits.1 parent 77a20db commit 84543f6
1 file changed
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
285 | 295 | | |
286 | 296 | | |
287 | 297 | | |
288 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
292 | 309 | | |
293 | 310 | | |
294 | 311 | | |
295 | 312 | | |
296 | | - | |
| 313 | + | |
297 | 314 | | |
298 | 315 | | |
299 | 316 | | |
| |||
0 commit comments