module Text.Search.Sphinx.Configuration where
import qualified Text.Search.Sphinx.Types as T
data Configuration = Configuration {
Configuration -> String
host :: String
, Configuration -> Int
port :: Int
, Configuration -> String
encoding :: String
, Configuration -> [Int]
weights :: [Int]
, Configuration -> Int
offset :: Int
, Configuration -> Int
limit :: Int
, Configuration -> MatchMode
mode :: T.MatchMode
, Configuration -> Rank
ranker :: T.Rank
, Configuration -> String
rankExpr :: String
, Configuration -> Sort
sort :: T.Sort
, Configuration -> String
sortBy :: String
, Configuration -> Int
minId :: Int
, Configuration -> Int
maxId :: Int
, Configuration -> [Filter]
filters :: [T.Filter]
, Configuration -> String
groupBy :: String
, Configuration -> String
groupSort :: String
, Configuration -> GroupByFunction
groupByFunc :: T.GroupByFunction
, Configuration -> String
groupDistinct :: String
, Configuration -> Int
maxMatches :: Int
, Configuration -> Int
cutoff :: Int
, Configuration -> Int
retryCount :: Int
, Configuration -> Int
retryDelay :: Int
, Configuration -> [(String, Int)]
indexWeights :: [(String, Int)]
, Configuration -> Int
maxQueryTime :: Int
, Configuration -> [(String, Int)]
fieldWeights :: [(String, Int)]
, Configuration -> String
selectClause :: String
}
deriving (Int -> Configuration -> ShowS
[Configuration] -> ShowS
Configuration -> String
(Int -> Configuration -> ShowS)
-> (Configuration -> String)
-> ([Configuration] -> ShowS)
-> Show Configuration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Configuration -> ShowS
showsPrec :: Int -> Configuration -> ShowS
$cshow :: Configuration -> String
show :: Configuration -> String
$cshowList :: [Configuration] -> ShowS
showList :: [Configuration] -> ShowS
Show)
defaultConfig :: Configuration
defaultConfig = Configuration {
port :: Int
port = Int
3312
, host :: String
host = String
"127.0.0.1"
, encoding :: String
encoding = String
"UTF-8"
, weights :: [Int]
weights = []
, offset :: Int
offset = Int
0
, limit :: Int
limit = Int
20
, mode :: MatchMode
mode = MatchMode
T.All
, ranker :: Rank
ranker = Rank
T.ProximityBm25
, rankExpr :: String
rankExpr = String
""
, sort :: Sort
sort = Sort
T.Relevance
, sortBy :: String
sortBy = String
""
, minId :: Int
minId = Int
0
, maxId :: Int
maxId = Int
0
, filters :: [Filter]
filters = []
, groupSort :: String
groupSort = String
"@group desc"
, groupBy :: String
groupBy = String
""
, groupByFunc :: GroupByFunction
groupByFunc = GroupByFunction
T.Day
, groupDistinct :: String
groupDistinct = String
""
, maxMatches :: Int
maxMatches = Int
1000
, cutoff :: Int
cutoff = Int
0
, retryCount :: Int
retryCount = Int
0
, retryDelay :: Int
retryDelay = Int
0
, indexWeights :: [(String, Int)]
indexWeights = []
, maxQueryTime :: Int
maxQueryTime = Int
0
, fieldWeights :: [(String, Int)]
fieldWeights = []
, selectClause :: String
selectClause = String
"*"
}