VectorStore search filters doesn't support multiple $like/$ilike/$in/$nin on same column #78

Closed
opened 2026-02-16 05:16:28 -05:00 by yindo · 0 comments
Owner

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

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 * Ilike filter param return: https://github.com/langchain-ai/langchain-postgres/blob/main/langchain_postgres/v2/async_vectorstore.py#L1133 * Dict param update: https://github.com/langchain-ai/langchain-postgres/blob/main/langchain_postgres/v2/async_vectorstore.py#L1209
yindo closed this issue 2026-02-16 05:16:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langchain-postgres#78