Hi all,
I'm working within an n8n workflow, using the "Supabase Vector Store" node to perform semantic searches against a Supabase/pgvector database.
My vector store setup follows the standard SQL provided in the Supabase documentation – the basic documents table (with a metadata JSONB column) and the match_documents function that uses the pgvector extension. Document dates are stored within the metadata column (e.g., {"date": "YYYY-MM-DD", ...}).
The challenge I'm facing is filtering results by a date range (e.g., documents from the last 7 days). The n8n "Supabase Vector Store" node calls the standard match_documents function, which filters metadata using the metadata @> filter operator. While this works perfectly for exact key-value matches entered in the node's "Metadata Filter" options, it seems unsuitable for range comparisons on values (like dates) stored inside the JSONB.
Given these constraints with the standard function and the n8n node, has anyone found an effective alternative or workaround? I need to combine the vector similarity search with filtering by a date range stored in the metadata, preferably within the n8n context.
Looking for suggestions – perhaps SQL function modifications that are compatible, or different n8n approaches beyond the basic Supabase node?
Thanks for any insights!