bleroy / lunr-core

A port of LUNR.js to .NET Core
MIT License
565 stars 24 forks source link

[BUG] Using the term presence feature doesn't work in some cases #47

Closed mozahr closed 2 years ago

mozahr commented 2 years ago

To Reproduce making a search with term presence 'and' for example : "+dog +i" gives this error => An item with the same key has already been added. Key: name'

Expected behavior

ziadakiki commented 2 years ago

I second this, I had the same issue. The expected behavior IMO should be to take both words, "dog" and "i", use them and return results containing both words. Currently it is throwing the error mentioned above.

bleroy commented 2 years ago

Thanks for the report. I believe this is already fixed, I just need to publish a fixed package. I'll add a test and a fix soon if that's not the case.

bleroy commented 2 years ago

Fixed. Will publish a new package with the fix.