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

search: improve utilization of Lunr lib for better results #890

Open
McShelby opened this issue Aug 23, 2024 · 1 comment
Open

search: improve utilization of Lunr lib for better results #890

McShelby opened this issue Aug 23, 2024 · 1 comment
Labels
feature New feature or request idea A valuable idea that's currently not worked on

Comments

@McShelby
Copy link
Owner

McShelby commented Aug 23, 2024

Split from #888 (comment) by @postb99

Hello, since you intend a rework, an additional thought :) Maybe this could better be seen as new issue/wishes?

After reading Lunr documentation I found out that you decided to keep multi-term search to be only "ORed" and this is not my cup of tea but is basically Lunr's one :D but your configuration prevents using it. I would prefer a search that check for presence of every entered term, by design (especially for my site, lol). I would love to have feedback from other users that use the theme.

Secondly, you also prevented wildcard search, but I would like to try it once.

However I'm fully ok with removing tilde (fuzzy search) or caret (negation) because in French caret can be used for linking two words (two search terms then) or building a compound word (that I think would better give several search terms too).

A typical example where I can't find what I look for on my site is "arc-en-ciel" that would be better break into 3 search terms and all of them required for match.

It seems that you removed Lunr stemmers but you see to keep shipping stemmer files. Another thing that would be explained. Did you notice issues when keeping stemmers and your custom boosts?

Theme search page code:

Lunr documentation:

Cheers

Originally posted by @postb99 in #888 (comment)

@McShelby
Copy link
Owner Author

Hi Barabara. Thanks for taking a look into this.

I must admit that although I authored all the open search issues here, I haven't a good knowledge about the Lunr library. It worked for my use cases and not many did complain in the past ;-)

Most of the existing code is from the ancient past of this theme and not written by me. Especially the removal of the stemmers was something I missed completly during my past visits of the code. This looks really fishy. Sadly the commit message does not mention the reason or the intention behind it.

I am more than willing to change things here but currently search isn't much of a priority for me and it doesn't seem like a quick task. So if you like to work on this, I would be more than grateful!

@McShelby McShelby added feature New feature or request idea A valuable idea that's currently not worked on labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request idea A valuable idea that's currently not worked on
Projects
None yet
Development

No branches or pull requests

1 participant