yeraydiazdiaz / lunr.py

A Python implementation of Lunr.js 🌖
http://lunr.readthedocs.io
MIT License
187 stars 16 forks source link

Add trimmer to search (breaks bug-compatibility with lunr.js) #154

Open dhdaines opened 1 month ago

dhdaines commented 1 month ago

Fixes #151 but breaks bug-compatibility with lunr.js. The Javascript-side workaround is noted in https://github.com/olivernn/lunr.js/issues/532 ... will lunr.js get updated? Magic 8-ball says "UNLIKELY"

dhdaines commented 1 month ago

Note that adding the stopword filter to search isn't really necessary since those terms just won't be in the index.

The trimmer on the other hand is really useful for the reason mentione above.

But again ... this breaks compatibility with lunr.js so you probably shouldn't merge it!

dhdaines commented 1 month ago

Updated this because the stopword filter actually isn't useful in the search pipeline. But the trimmer is!