Commit 999fa5d
authored
Simplify
#1141 introduced the `FilteredAccessor` trait with two `expand_beam`
style methods. This split existed because evaluation of the
`HybridPredicate` differed subtly between the "all" and "accept only"
paths, but this difference was sufficient to completely tank recall in
multi-hop filtered search if rejected IDs were passed to the
`PredicateMut`. The two-method solution made this harder, but at the
cost of needing to create a new `Accept` type to pass to `Predicate`
even before a decision had been made, which is confusing.
I think this cleans up that confusion by changing the bound on
`expand_beam_accept_only` from
```rust
P: HybridPredicate<Accept<Self::Id>>
```
to
```rust
P: Predicate<Self::Id> + PredicateMut<Accept<Self::Id>>
```
This makes it clear that raw, unclassified IDs can be used for the
non-mutating evaluation while only accepted IDs can be passed to
`eval_mut`. The docs have been updated to reflect that the rules of
`HybridPredicate` also apply to this pair of traits.expand_beam_accept_only pre-filter predicate (#1192)1 parent b5ebac2 commit 999fa5d
2 files changed
Lines changed: 9 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
280 | | - | |
| 278 | + | |
281 | 279 | | |
282 | 280 | | |
283 | 281 | | |
| |||
295 | 293 | | |
296 | 294 | | |
297 | 295 | | |
298 | | - | |
| 296 | + | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | 542 | | |
552 | 543 | | |
553 | 544 | | |
| |||
568 | 559 | | |
569 | 560 | | |
570 | 561 | | |
571 | | - | |
572 | 562 | | |
573 | 563 | | |
574 | 564 | | |
| |||
0 commit comments