X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Rakka.git;a=blobdiff_plain;f=Rakka%2FStorage%2FTypes.hs;h=2944f287038ba81ee45389694bcfc8901ba73b56;hp=06870e65d82529bb722b45d7d415ba24800322b0;hb=e751af5e3d23d7757f363bf4e86f9d732d90be7f;hpb=f7ff1639d50b827a8ce1e4dd3631ce300ecb3d19 diff --git a/Rakka/Storage/Types.hs b/Rakka/Storage/Types.hs index 06870e6..2944f28 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,19 @@ 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 + = NormalText !String + | HighlightedWord !String + deriving (Show, Eq) \ No newline at end of file