mirror of
https://github.com/langchain-ai/langchain-postgres.git
synced 2026-07-16 01:33:18 -04:00
VectorStore search filters doesn't support multiple $like/$ilike/$in/$nin on same column #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CXmartins on GitHub (Jun 13, 2025).
When performing a search with filters that have multiple values for the same column, the current implementation only keeps the value for the last filter instance.
Example of a filter that fails:
{"$and": [{"code": {"$like": "WH00%"}}, {"code": {"$like": "EC00%"}}]}current implementation keeps saves the params for ilike with the key column_name_ilike, thus with a random id only keeps the last value for each given column. In the example above would be {"code_ilike", "EC00%"}
Relevant code