andrew-codes / gatsby-plugin-elasticlunr-search

Gatsby search plugin via elastic lunr client-side search index.
http://gatsby-plugin-search.andrew.codes/
MIT License
88 stars 45 forks source link

Allow to clear the "stop words" in elasticlunr's index #35

Open lucastobrazil opened 2 years ago

lucastobrazil commented 2 years ago

It appears that searching for "common" words are filtered out with elasticlunr's "stop word" filter. So words like "to", and "but" will not return a result. I would like to be able to clear this one (my use case is searching for component names in a design system documentation site, so words like "tooltip" and "button" don't come up until you type the whole word

Elasticlunr has a method elasticlunr.clearStopWords() -> is it possible to expose that method in the config?

http://elasticlunr.com/docs/stop_word_filter.js.html

JustinGillespie commented 10 months ago

@lucastobrazil I am running into the exact same issue currently. I have tried to find some documentation for the stopwords and how to configure them via the gatsby plugin, but havent gotten far. I know this was awhile back but were you able to resolve this?