X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FStorage%2FTypes.hs;h=c83e53e0cd3bf8663eba2883573eeda9f2775708;hb=529f792d338c75910079903e143d4dd21bd806c3;hp=06870e65d82529bb722b45d7d415ba24800322b0;hpb=e43bb104a7313dd696b8bb8aa3bafff94706a187;p=Rakka.git diff --git a/Rakka/Storage/Types.hs b/Rakka/Storage/Types.hs index 06870e6..c83e53e 100644 --- a/Rakka/Storage/Types.hs +++ b/Rakka/Storage/Types.hs @@ -1,6 +1,8 @@ module Rakka.Storage.Types ( Storage(..) , IndexReq(..) + , SearchResult(..) + , SnippetFragment(..) ) where @@ -21,4 +23,20 @@ data Storage data IndexReq = RebuildIndex | SyncIndex - | SearchIndex !Condition !(TMVar [(PageName, RevNum)]) + | SearchIndex !Condition !(TMVar [SearchResult]) + + +data SearchResult + = SearchResult { + srPageName :: !PageName + , srPageRev :: !RevNum + , srSnippet :: [SnippetFragment] + } + deriving (Show, Eq) + + +data SnippetFragment + = Boundary + | NormalText !String + | HighlightedWord !String + deriving (Show, Eq) \ No newline at end of file