/searchengine/examples/hayoo/source/Hayoo/Actions.hs
Haskell | 47 lines | 23 code | 9 blank | 15 comment | 0 complexity | 50900c6c93b4b956177a314eaf7af9ad MD5 | raw file
Possible License(s): MIT, BSD-3-Clause
- -- ----------------------------------------------------------------------------
- {- |
- Module : Hayoo.Actions
- Copyright : Copyright (C) 2009 Sebastian M. Schlatt
- License : MIT
- Maintainer : Sebastian Schlatt (sms@holumbus.org)
- Stability : experimental
- Portability: portable
- Version : 0.1
- -}
- -- ----------------------------------------------------------------------------
- module Hayoo.Actions where
- import Holumbus.Index.Documents
- import Holumbus.Index.Common
- import Holumbus.Build.Config
- import Data.Set (Set)
- import qualified Data.Set as S
- import Holumbus.MapReduce.Types
- import Hayoo.Crawl
- import Hayoo.Common
-
- hayooCrawlAction ::
- ActionConfiguration
- (CrawlerState Documents FunctionInfo)
- DocId URI
- () (MD5Hash, Maybe (Document FunctionInfo), Set URI)
- (MD5Hash, Maybe (Document FunctionInfo), Set URI) (CrawlerState Documents FunctionInfo)
- hayooCrawlAction
- = (defaultActionConfiguration "HAYOO_CRAWL")
- { ac_Map = Just mapAction
- -- , ac_Combine = Nothing
- , ac_Reduce = Just reduceAction
- }
- where
- mapAction = (defaultMapConfiguration mapHayooCrawl)
- reduceAction = (defaultReduceConfiguration (reduceHayooCrawl (emptyDocuments :: Documents FunctionInfo)) )
-