Vector search filter: Id NOT in array
I'm trying to vector search on messages but want to exclude a message (the most recent user prompt) based on Id before the search.
Is this possible with the filter or does it just have to be done after?
2 Replies
currently vector search filters only support OR and EQ, so there's no way to exclude a message and also the syntax
(q) => q.eq("userId", userId) && q.eq("chatId", chatId)
doesn't work. we've been thinking about how to support intersections in addition to unions, but it's not supported yet. i recommend picking the most restrictive filter (userId or chatId) as part of the vector search and post-filtering for the rest.Alright, cheers