Like clause for metadata filtering

is there a like clause or a workaround to include a like clause when filtering metadata?
for example if i have vectors:

vector1: { “company”: [“International Trade”] }
vector2: { “company”: [““oranges”] }
vector3: { “company”: [“International exp”] }

Could someone explain what sort of clause would lead to a match with vector 1 and vector 3 if i search for the term “international” only?

Hi!

As per documentation Metadata filtering there isn’t yet a “like” clause. What you could do is create a new metadata company_split for example and split the company by spaces. That will give you:

vector1: { “company_split”: [“International","Trade”] ... }
vector2: { “company_split”: [“oranges”] ... }
vector3: { “company_split”: [“International","exp”] ... }

Then you can combine your filter with OR and use “in” clause.

Hope this helps!

1 Like

thanks jasper that sounds like a great idea