Closed sosharma1403 closed 6 years ago
The reason Lunr returns no results for your query is because this
is one of the words filtered by the stopWordFilter
, which skips it during the indexing of the document as it's considered an non-content word in english.
Searching for other more meaningful words like user
or modular
does return results.
If you want full control over the index building process you skip using the lunr
function and create a lunr.Builder
manually removing the stopWordsFilter
from the pipeline similar to what the lunr
function does.
Just to add one thing, if you need a different set of words to be considered stop words you can use lunr.generateStopWordFilter
to create a custom stop word filter. This is exactly how the default stop word filter is created.
Should return match for
this