Portability | portable |
---|---|
Stability | alpha |
Maintainer | Krzysztof Langner <klangner@gmail.com> |
Safe Haskell | Safe-Inferred |
This module contains functions which create, update and search index. Default implementation uses algorithms for english language (stemming, stop words etc.)
Functions in this module (for performance reasons) are based on unicode strings Data.Text.
Documentation
addDocument :: Document -> Index -> IndexSource
Add document to the index. This function uses algorithms for english language to split document content into index terms.
addDocTerms :: DocName -> [Term] -> Index -> IndexSource
Add document to the index. This function should be used if document content should be splitted into terms with custom algorithms.
Create empty index. This index will be configured for english language.
search :: Index -> String -> [DocName]Source
Search terms given as single string in the index This function uses algorithms for english language to split query into tokens.
searchTerms :: Index -> [Term] -> [DocName]Source
Search terms given as array in the index. This function should be used if query should be splitted into terms with custom algorithms