PageRenderTime 52ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/searchengine/examples/hayoo/source/Hayoo/Actions.hs

http://github.com/fortytools/holumbus
Haskell | 47 lines | 23 code | 9 blank | 15 comment | 0 complexity | 50900c6c93b4b956177a314eaf7af9ad MD5 | raw file
Possible License(s): MIT, BSD-3-Clause
  1. -- ----------------------------------------------------------------------------
  2. {- |
  3. Module : Hayoo.Actions
  4. Copyright : Copyright (C) 2009 Sebastian M. Schlatt
  5. License : MIT
  6. Maintainer : Sebastian Schlatt (sms@holumbus.org)
  7. Stability : experimental
  8. Portability: portable
  9. Version : 0.1
  10. -}
  11. -- ----------------------------------------------------------------------------
  12. module Hayoo.Actions where
  13. import Holumbus.Index.Documents
  14. import Holumbus.Index.Common
  15. import Holumbus.Build.Config
  16. import Data.Set (Set)
  17. import qualified Data.Set as S
  18. import Holumbus.MapReduce.Types
  19. import Hayoo.Crawl
  20. import Hayoo.Common
  21. hayooCrawlAction ::
  22. ActionConfiguration
  23. (CrawlerState Documents FunctionInfo)
  24. DocId URI
  25. () (MD5Hash, Maybe (Document FunctionInfo), Set URI)
  26. (MD5Hash, Maybe (Document FunctionInfo), Set URI) (CrawlerState Documents FunctionInfo)
  27. hayooCrawlAction
  28. = (defaultActionConfiguration "HAYOO_CRAWL")
  29. { ac_Map = Just mapAction
  30. -- , ac_Combine = Nothing
  31. , ac_Reduce = Just reduceAction
  32. }
  33. where
  34. mapAction = (defaultMapConfiguration mapHayooCrawl)
  35. reduceAction = (defaultReduceConfiguration (reduceHayooCrawl (emptyDocuments :: Documents FunctionInfo)) )