Files
1ea4879408 fix(local): apply MMR offset to the re-ranked output, not the candidates (#1420)
* fix(local): apply MMR offset to the re-ranked output, not the candidates

Local mode passed `offset` to the candidate search inside `_search_with_mmr`
and then returned the first `limit` MMR picks unsliced. That both hid the top
`offset` nearest points from MMR and silently returned page 1 for every page
request.

Core plans MMR the other way around: the candidate `CoreSearchRequest` is built
with `offset: 0` and `limit: candidates_limit`, the MMR rescore stage gets
`limit + offset`, and the offset is cut off afterwards
(lib/shard/src/query/planned_query.rs). Match that: search candidates with
offset 0, re-rank `limit + offset` points, slice off the offset.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* tests: rephrase the comment, move tests to congruence

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2026-09-15 02:31:37 +07:00
..
2023-03-28 14:57:05 +02:00
2023-07-21 23:15:25 +02:00
2024-11-15 15:54:32 +01:00
2025-01-06 11:44:25 +00:00
2024-08-08 16:56:21 +02:00