TCache-0.9: A Transactional cache with user-defined persistence

Data.TCache.IndexText

Synopsis

Documentation

indexTextSource

Arguments

:: (IResource a, Typeable a, Typeable b) 
=> (a -> b)

field to index

-> (b -> Text)

method to convert the field content to Text (for example pack in case of String fields). This permits to index non Textual fields

-> IO () 

start a trigger to index the contents of a register field

containsSource

Arguments

:: (IResource a, Typeable a, Typeable b) 
=> (a -> b)

field to search in

-> String

text to search

-> STM [DBRef a] 

return the DBRefs whose fields include all the words of length three or more in the requested text contents