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
During the discussion and implementation of #1562 (query abstraction), a query-level filter system was part of the original design in #1570 but removed before merge to be addressed separately.
QueryInterface is an empty marker interface — no filter support
VectorQuery, TextQuery, HybridQuery carry only search intent, no filter parameter
The existing Document\FilterInterface filters document streams during indexing — a different concept
Stores like Postgres, Pinecone, Qdrant, ChromaDB, etc. all support metadata filtering natively but there is no unified API for it
Proposal
Introduce a lightweight query-level filter system, starting with basic equality filters on document metadata. This was already discussed and prototyped in #1570 as EqualFilter.
During the discussion and implementation of #1562 (query abstraction), a query-level filter system was part of the original design in #1570 but removed before merge to be addressed separately.
As @pkothmair pointed out, this feature is still missing.
Current State
QueryInterfaceis an empty marker interface — no filter supportVectorQuery,TextQuery,HybridQuerycarry only search intent, no filter parameterDocument\FilterInterfacefilters document streams during indexing — a different conceptProposal
Introduce a lightweight query-level filter system, starting with basic equality filters on document metadata. This was already discussed and prototyped in #1570 as
EqualFilter.Example Usage
Open Questions
$optionsarray?In [Store] Open
Store::query(Vector)method for different query types #1562, @Guikingone and @ahmed-bhs argued for keeping execution options (limit, minScore) in$optionsand search intent (filters) on the query — which aligns with the current query abstraction design.EqualFilteror also include range/comparison filters?UnsupportedFeatureExceptionor silently ignore?Related
Store::query(Vector)method for different query types #1562 — original RFC where filtering was discussedcc @Guikingone @ahmed-bhs @pkothmair