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