rluiten / elm-text-search / StopWordFilter

StopWordFilter is an English language stop word list filter, any words contained in the list are not stored in the index.

This is intended to be used in the ElmTextSearch token processing pipeline.

Things to know about stop word lists.

create default stop word filter func

createDefaultFilterFunc : Index.Model.Index doc -> ( Index.Model.Index doc, String -> Basics.Bool )

Default english stop word filter suitable for ElmTextSearch.

A default stop word english filter list

stopEnglishWordList : List String

Default english stop word list to create filter.

Create a custom stop word filter list

createFilterFuncWith : List String -> Index.Model.Index doc -> ( Index.Model.Index doc, String -> Basics.Bool )

Create stop word list filter suitable for ElmTextSearch, this versions extends the default word list with the extra words provided.

createFilterFunc : List String -> Index.Model.Index doc -> ( Index.Model.Index doc, String -> Basics.Bool )

Create stop word filter for provided list of tokens suitable for ElmTextSearch.

** This creates a stop world filter purely from your own word list, understand what you are doing and consequences if you use this. **

The FilterFunc created returns True to allow words into index. So words found in the stopWordList return False