Query with `NOT` in the beginning do not respect the `NOT` clause
laggingreflex opened this issue · 1 comments
laggingreflex commented
const data = [
{ name: 'C-3PO' , description: 'Protocol droid.' , species: 'Droid' },
{ name: 'R2-D2' , description: 'Astromech droid built on Naboo.', species: 'Droid' },
{ name: 'Anakin Skywalker', description: 'Fallen Jedi, the chosen one.' , species: 'Human' },
{ name: 'Obi-Wan Kenobi' , description: 'Jedi Master.' , species: 'Human' },
{ name: 'Moon Moon' , description: 'Mentally challenged wolf.' , species: 'Wolf' },
];
console.log(data.filter(lucene('NOT anakin')));
Expected: All items except Anakin
Current result: Shows just Anakin. I.e. it ignores the "NOT" clause.
finwo commented
A separate NOT
operator has never been implemented. It should be and will be as soon as I get the chance to rewrite this library