( Storage(..)
, IndexReq(..)
, SearchResult(..)
+ , HitPage(..)
, SnippetFragment(..)
)
where
data IndexReq
= RebuildIndex
| SyncIndex
- | SearchIndex !Condition !(TMVar [SearchResult])
+ | SearchIndex !Condition !(TMVar SearchResult)
data SearchResult
= SearchResult {
- srPageName :: !PageName
- , srPageRev :: !RevNum
- , srSnippet :: [SnippetFragment]
+ srTotal :: !Int
+ , srPages :: ![HitPage]
+ }
+ deriving (Show, Eq)
+
+
+data HitPage
+ = HitPage {
+ hpPageName :: !PageName
+ , hpPageRev :: !RevNum
+ , hpSnippet :: [SnippetFragment]
}
deriving (Show, Eq)