Metadata matching searching, match has to encompass

vector1: { “genre”: [“comedy”] }
vector2: { “genre”: [“comedy”, “documentary”] }

search: [comedy, action]
vector 1 matches because all it has is comedy
vector 2 doesn’t match because it’s both comedy and documentary.

Basically the search terms are greater than the vector metadata, but will match if 100% of the meta data is within the search term

example 2
vector1: { “genre”: [“comedy”, “action”] }
vector2: { “genre”: [“comedy”, “action”, “documentary”] }
vector3: { “genre”: [“action”] }

search: [comedy, action]
both vector1 and vector3 will produce a match but not vector 2.

Have you tried some of the filter operators like “in”?

"filter": {"genre": {"$in": ["action", "drama"]}}

yeah but in the case of $ the first case would match everything. my goal is that it’s matched as much as it could and its that’s all the fields that row has it would still be a match.

lets say i’m searching for
“filter”: {“genre”: {“$in”: [“action”, “drama”]}}

with data like
vector1: { “genre”: [“comedy”, “action”] }
vector2: { “genre”: [“comedy”, “action”, “documentary”] }
vector3: { “genre”: [“action”] }

this will produce a match on all 3 vectors but I only want this query to match on vector3. Because the other vectors include genres not included in the search query. However, vector3 despite not having drama matched all the searchquery with its fields.

Lemme know if this makes sense? Its kinda of a unique search

You may have to use the $nin operator to filter out the genres you don’t care about. So something like this:

{"$and": [ 
 { "genre": {"$in": ["action","drama"]},
 { "genre": {"$nin": ["comedy","documentary","horror","scifi","fantasy", ... }]

Unfortunately metadata filtering doesn’ts support wildcards, so you’ll need to add all of the other genres you’re tracking manually to the “$nin” list. But this should do what you’re looking for.

Hi Cory, any ideas of when wildcard matching will be available? starting to see a potential problem in the future where genre doesn’t have a capped unique limit. Don’t want to send a list of $nin of unknown size