You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #856 [Store] Fix CacheStore and InMemoryStore to return similarity scores (camilleislasse)
This PR was squashed before being merged into the main branch.
Discussion
----------
[Store] Fix CacheStore and InMemoryStore to return similarity scores
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| Docs? | no
| Issues | n/a
| License | MIT
## Description
The `DistanceCalculator` was calculating distances but not returning them in the `VectorDocument` results. This meant queries to `CacheStore` and `InMemoryStore` returned
documents without score information, making it impossible to determine result relevance.
## Changes
This fix creates new `VectorDocument` instances with the calculated distance as the `score` property, matching the pattern used by other stores (Redis, MariaDb, Postgres).
Commits
-------
65e85c3 [Store] Fix CacheStore and InMemoryStore to return similarity scores
0 commit comments