Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query with NOT in the beginning do not respect the NOT clause #45

Open
laggingreflex opened this issue Apr 30, 2020 · 1 comment
Open
Assignees

Comments

@laggingreflex
Copy link
Contributor

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
Copy link
Owner

finwo commented May 2, 2020

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

@finwo finwo self-assigned this Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants