Closed Seyronh closed 2 months ago
I modified the code and it worked properly maybe its the solution?
case '$in':
if (typeof value == 'boolean') {
return false;
} else if(typeof value == 'string' && !filter[key].includes(value)){
return false
} else if(!filter[key].some(val => val.includes(value))){
return false
}
break;
@Seyronh mind submitting your fix as a PR?
I need to create more rigorous unit tests around the filtering bits...
When using the metadata filter in queryItems as described in https://docs.pinecone.io/docs/metadata-filtering, I am making the following request:
The index I'm searching for has the metadata
categories
set to["one"]
, but it is returning 0 matches.Perhaps using filter[key].some(val => val.includes(value)) when the value is an array could make it work properly?