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
{{ message }}
Repository navigation
PgvectorDocumentStore: numeric meta filters are cast to integer/real, giving wrong results or errors #4148
Describe the bug PgvectorDocumentStore reads meta values as text (meta->>'key') and casts them according to the Python type of the filter value: int becomes ::integer and float becomes ::real. This leads to three divergences from InMemoryDocumentStore:
Silently wrong float results.real is single precision, so (meta->>'n')::real = 0.1 is compared against a double-precision 0.1 and never matches. Range filters near a value, and large floats (16777217.0 > 16777216.0), are also wrong.
Error when an int filter value meets float metadata.{"field": "meta.n", "operator": ">=", "value": 1} raises DocumentStoreError ... InvalidTextRepresentation as soon as any document stores e.g. 1.5 under that key.
Activity