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.) But it should be possible to customize it for any language by modifying Index data type.
- type DocName = String
- data Index
- type DocContent = String
- addDocument :: DocName -> DocContent -> Index -> Index
- emptyIndex :: Index
- search :: Index -> DocContent -> [DocName]
- termCount :: Index -> Int
Documentation
type DocContent = StringSource
addDocument :: DocName -> DocContent -> Index -> IndexSource
Add document to the index
Create empty index. This index will be configured for english language.
search :: Index -> DocContent -> [DocName]Source
Search term in the index