Commit f476016
Convert BMW implementations into publicly-available
As a step towards
[this](paradedb/paradedb#5300), do the
following:
- Introduce a `PruningScorer` trait that extends a `Scorer` to support
setting a threshold.
- Adds a `pruning_scorer` method to the `Weight` trait, with a default
implementation returning a `BasicPruningScorer`.
- Moves the logic for all 3 (union, single, and intersection)
block-max-wand variants into `PruningScorer` implementations so that
they can be driven externally.
- Has `BooleanWeight::pruning_scorer` drive the BMW choice.
- Changes the visibility of the BMW scorers and they're inputs to be
available to consumers of the library.
In repo benchmarks show this change to be a strict improvement for BMW
intersection and at most low-single-digit-percentage-points (<4%) worse
for some BMW query shapes when ran on both my Mac and a dedicated Linux
box.
---------
Signed-off-by: RJ Barman <rjhallsted@gmail.com>
Co-authored-by: Stu Hood <stuhood@paradedb.com>PruningScorers. (#162)1 parent 902dd08 commit f476016
13 files changed
Lines changed: 804 additions & 338 deletions
File tree
- src
- indexer
- query
- boolean_query
- phrase_query
- term_query
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| |||
Large diffs are not rendered by default.
0 commit comments