[lunr] Add missing lunr.generateStopWordFilter function (#21998)

This commit is contained in:
Sean Tan
2017-12-06 23:36:11 +08:00
committed by Andy
parent 7f0c54c130
commit 4f6ef35ca8

13
types/lunr/index.d.ts vendored
View File

@@ -626,6 +626,19 @@ declare namespace lunr {
*/
function stemmer(token: Token): Token;
/**
* lunr.generateStopWordFilter builds a stopWordFilter function from the provided
* list of stop words.
*
* The built in lunr.stopWordFilter is built using this generator and can be used
* to generate custom stopWordFilters for applications or non English languages.
*
* @param stopWords - The list of stop words
* @see lunr.Pipeline
* @see lunr.stopWordFilter
*/
function generateStopWordFilter(stopWords: string[]): PipelineFunction;
/**
* lunr.stopWordFilter is an English language stop word list filter, any words
* contained in the list will not be passed through the filter.