I need help trying to figure out how the best way to create a query to search keywords array.
I want to be able to search with array ["work", "hi"]
comparing to an array in schema
["work", "school"]
and should return this document. Right now I'm using
this.resumes.find({
keywords: {
$all: term.split(' ')
}
}).limit(50)
.select('-keywords').exec(function (err, resumes) {});
but this only works if both are in the search array are in the schema array. So how can I do a partial match?