Open Jorenm opened 10 years ago
I also think this should be added. I accomplished it with this hack:
// Treat search query as an entire token
Sifter.prototype.tokenize = function(query) {
if(!query || !query.length) {
return [];
} else {
return [{
string: query,
regex: new RegExp(query, 'i')
}];
}
};
It doesn't work if I just override tokenize
for a single Sifter object for some reason.
So "red car" would only match explicitly "red car", not red, car, reddit, carnage, etc.