module Text.Search.Sphinx.ExcerptConfiguration where
data ExcerptConfiguration = ExcerptConfiguration {
host :: String
, port :: Int
, beforeMatch :: String
, afterMatch :: String
, chunkSeparator :: String
, limit :: Int
, around :: Int
, exactPhrase :: Bool
, singlePassage :: Bool
, useBoundaries :: Bool
, weightOrder :: Bool
, queryMode :: Bool
, forceAllWords :: Bool
, limitPassages :: Int
, limitWords :: Int
, startPassageId :: Int
, loadFiles :: Bool
, htmlStripMode :: String
, allowEmpty :: Bool
}
deriving (Show)
defaultConfig = ExcerptConfiguration {
port = 3312
, host = "127.0.0.1"
, beforeMatch = "<b>"
, afterMatch = "</b>"
, chunkSeparator = "..."
, limit = 256
, around = 5
, exactPhrase = False
, singlePassage = False
, weightOrder = False
, queryMode = False
, forceAllWords = False
, limitPassages = 0
, limitWords = 0
, useBoundaries = False
, startPassageId = 1
, loadFiles = False
, htmlStripMode = "index"
, allowEmpty = False
}
altConfig = defaultConfig {
beforeMatch = "<span class='match'>"
, afterMatch = "</span>"
, chunkSeparator = " … "
, forceAllWords = True
}