module Text.Search.Sphinx.ExcerptConfiguration where
data ExcerptConfiguration = ExcerptConfiguration {
ExcerptConfiguration -> String
host :: String
, ExcerptConfiguration -> Int
port :: Int
, ExcerptConfiguration -> String
encoding :: String
, ExcerptConfiguration -> String
beforeMatch :: String
, ExcerptConfiguration -> String
afterMatch :: String
, ExcerptConfiguration -> String
chunkSeparator :: String
, ExcerptConfiguration -> Int
limit :: Int
, ExcerptConfiguration -> Int
around :: Int
, ExcerptConfiguration -> Bool
exactPhrase :: Bool
, ExcerptConfiguration -> Bool
singlePassage :: Bool
, ExcerptConfiguration -> Bool
useBoundaries :: Bool
, ExcerptConfiguration -> Bool
weightOrder :: Bool
, ExcerptConfiguration -> Bool
queryMode :: Bool
, ExcerptConfiguration -> Bool
forceAllWords :: Bool
, ExcerptConfiguration -> Int
limitPassages :: Int
, ExcerptConfiguration -> Int
limitWords :: Int
, ExcerptConfiguration -> Int
startPassageId :: Int
, ExcerptConfiguration -> Bool
loadFiles :: Bool
, ExcerptConfiguration -> String
htmlStripMode :: String
, ExcerptConfiguration -> Bool
allowEmpty :: Bool
, ExcerptConfiguration -> String
passageBoundary :: String
}
deriving (Int -> ExcerptConfiguration -> ShowS
[ExcerptConfiguration] -> ShowS
ExcerptConfiguration -> String
(Int -> ExcerptConfiguration -> ShowS)
-> (ExcerptConfiguration -> String)
-> ([ExcerptConfiguration] -> ShowS)
-> Show ExcerptConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExcerptConfiguration -> ShowS
showsPrec :: Int -> ExcerptConfiguration -> ShowS
$cshow :: ExcerptConfiguration -> String
show :: ExcerptConfiguration -> String
$cshowList :: [ExcerptConfiguration] -> ShowS
showList :: [ExcerptConfiguration] -> ShowS
Show)
defaultConfig :: ExcerptConfiguration
defaultConfig = ExcerptConfiguration {
port :: Int
port = Int
3312
, host :: String
host = String
"127.0.0.1"
, encoding :: String
encoding = String
"utf8"
, beforeMatch :: String
beforeMatch = String
"<b>"
, afterMatch :: String
afterMatch = String
"</b>"
, chunkSeparator :: String
chunkSeparator = String
"..."
, limit :: Int
limit = Int
256
, around :: Int
around = Int
5
, exactPhrase :: Bool
exactPhrase = Bool
False
, singlePassage :: Bool
singlePassage = Bool
False
, weightOrder :: Bool
weightOrder = Bool
False
, queryMode :: Bool
queryMode = Bool
False
, forceAllWords :: Bool
forceAllWords = Bool
False
, limitPassages :: Int
limitPassages = Int
0
, limitWords :: Int
limitWords = Int
0
, useBoundaries :: Bool
useBoundaries = Bool
False
, startPassageId :: Int
startPassageId = Int
1
, loadFiles :: Bool
loadFiles = Bool
False
, htmlStripMode :: String
htmlStripMode = String
"index"
, allowEmpty :: Bool
allowEmpty = Bool
False
, passageBoundary :: String
passageBoundary = String
"none"
}
altConfig :: ExcerptConfiguration
altConfig = ExcerptConfiguration
defaultConfig {
beforeMatch = "<span class='match'>"
, afterMatch = "</span>"
, chunkSeparator = " … "
, forceAllWords = True
}