yeraydiazdiaz / lunr.py

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

Improve language support documentation #148

Closed dhdaines closed 1 month ago

dhdaines commented 1 month ago

The documentation for customizing the pipelines doesn't work when using language support. Here is a patch describing how to do that.

Ideally, skip would be able to skip steps by name instead of having to look up the function as in the example, and it would be possible to iterate over the names in the actual pipeline stack. And there would be canonical names for the steps since currently they are a bit inconsistent.

(this is still way easier than the totally weird pre-ES5 lunr.js API of course!)

dhdaines commented 1 month ago

As a bonus, I've documented how to use unidecode to do accent (and other) folding on both the Python and JavaScript sides.

dhdaines commented 1 month ago

(also, just to add to all these PRs and comments: lunr.py is awesome, thank you for making it!)

yeraydiazdiaz commented 1 month ago

Hi @dhdaines, thanks for your PRs, I don't have a lot of time these days but I'll try to go through them this weekend, starting with this one which looks good 👍🏻

dhdaines commented 1 month ago

Hi @dhdaines, thanks for your PRs, I don't have a lot of time these days but I'll try to go through them this weekend, starting with this one which looks good 👍🏻

No problem, thanks for looking at them! I'm working on a project that uses lunr.py at the moment so I have time to help make any necessary changes (it may be a bit tricky to merge some of them since there is typing and also I wasn't sure if I should run black/isort on the code)

yeraydiazdiaz commented 1 month ago

Merging regardless of the codecov failure which I don't really understand as main does have the token. Hopefully other PRs won't have this issue.