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
Python: OracleCollection vector search raises AttributeError when filter is a list of multiple filters #14539
OracleCollection raises AttributeError: 'tuple' object has no attribute 'values' when filter is a list of two or more filters. VectorSearchOptions documents that multiple filters are combined with AND.
VectorStoreCollection._build_filter returns a single (sql, binds) tuple for one filter, but a list of those tuples for several. The code above only handles the single tuple case. With a list, parsed_filter[0] is a whole tuple and parsed_filter[1] is the second filter's tuple, which has no .values().
A second problem is hidden behind this one. _build_filter parses each filter with a fresh BindCounter, so every filter starts at :bind_val1. Even if the list were handled, the names would collide.
Repro (current main, 9974625, oracledb installed, no database needed)
Actual: AttributeError: 'tuple' object has no attribute 'values'. A single filter works.
Expected: a query with WHERE ("color" = :bind_val1) AND ("size" > :bind_val2) and binds ['red', 5].
Fix
Override _build_filter in OracleCollection to parse all filters with one shared BindCounter and return one combined (sql, binds) tuple. I have this ready with tests and will open the PR right away.
Activity