kerighan / eldar

Boolean text search in Python
MIT License
44 stars 8 forks source link

Bug with single "NOT" in query #7

Closed khalo-sa closed 3 years ago

khalo-sa commented 3 years ago

Hi, and thank you for this library! I think I discovered a bug with version 0.0.5 .

The following piece works as I would expect:

from eldar import Query
eldar = Query('" " AND NOT "blacklisted"', match_word=False)
eldar("only contains whitelisted terms")
>>> True

For this however, I would expect it to return True as well, but it doesn't.

from eldar import Query
eldar = Query('NOT "blacklisted"', match_word=False)
eldar("only contains whitelisted terms")
>>> False
kerighan commented 3 years ago

Hi, Thanks for the bug report and sorry for the delay. It's fixed now with 0.0.6.