X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Rakka.git;a=blobdiff_plain;f=Rakka%2FStorage%2FTypes.hs;h=28184a676e574d54989cecc80af2301dbb95a5b2;hp=c83e53e0cd3bf8663eba2883573eeda9f2775708;hb=b4c0033f297c28d95ad9298b489126331224bc42;hpb=529f792d338c75910079903e143d4dd21bd806c3 diff --git a/Rakka/Storage/Types.hs b/Rakka/Storage/Types.hs index c83e53e..28184a6 100644 --- a/Rakka/Storage/Types.hs +++ b/Rakka/Storage/Types.hs @@ -2,6 +2,7 @@ module Rakka.Storage.Types ( Storage(..) , IndexReq(..) , SearchResult(..) + , HitPage(..) , SnippetFragment(..) ) where @@ -23,14 +24,22 @@ data Storage 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)