Hi all, what is the correct way to express a regex filter in the filter section of vectorSearch? I wanted to add a filter like “chunkText”: { $regex: ‘cashflow’, $options: ‘i’ }, but resulted in the error: ‘Match expression is not supported for $vectorSearch’.
$vectorSearch filter only supports the data types and comparison operators as provided in the documentation
The regex based is not supported with $vectorSearch. But you can use regex based filtering in ‘Atlas Search’ in a filter along with the knnBeta operator to get the desired outcome - https://www.mongodb.com/docs/atlas/atlas-search/knn-beta/
P.S. For me, a simple “isin” would suffice. I just want to pre-filter docs that contain a substring in a field (my field contains a string with comma-separated tags).