mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-13 04:04:09 +00:00
_get_candidate_embeddings()'s expand-and-retry loop widens the search pool (up to limit*10) when post-filtering leaves too few candidates. If the backend keeps returning a full page and filtered matches never reach `limit`, the loop exited via the while condition instead of the break branch, so the pre-loop empty embeddings/metadata/scores lists were returned instead of the matches actually found in the final iteration. This silently returned [] for filtered queries against large persistent-backend stores even when matches existed - exactly the scenario this PR adds support for. Falls back to the last collected batch instead of discarding it. Also documents this PR and #839 in the changelog.