Repository navigation
Conversation
Local mode excluded a point referenced by a prefetch query only from that prefetch, so a sibling prefetch could still return it and it ended up in the fused result. The ids referenced anywhere in the prefetch tree are now added to the root filter together with the root query's ids, and the existing filter propagation applies them to every prefetch, as the server does.
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
closes #1596
When a prefetch references a point by id, for example
NearestQuery(nearest=7)or aRecommendQuerywithpositive=[7], local mode excluded that id only from the same prefetch. A sibling prefetch could still return it, so it took an RRF rank there and ended up in the fused result. The server excludes ids referenced anywhere in the request from every prefetch._resolve_prefetch_inputnow returns the ids mentioned in its own query and in its nested prefetches, instead of adding them to its own filter.query_pointsandquery_points_groupsadd these ids, together with the ids mentioned by the root query, to the rootquery_filterwithignore_mentioned_ids_filter. The existing filter propagation inLocalCollection._prefetchthen applies them to every prefetch. Ids looked up from another collection throughlookup_fromare still not excluded, as before. The async local client has the same change.The new test in
tests/test_in_memory.pyruns RRF over an id-referencing prefetch and a plain vector prefetch whose top hit is that id. It covers aNearestQueryprefetch, aRecommendQueryprefetch and aNearestQuerynested one level down, and checks that bothquery_pointsandquery_points_groupsleave the id out and return the same scores as an explicit rootmust_not has_idfilter.All Submissions:
devbranch. Did you create your branch fromdev?Changes to Core Features: