better searchhost configuration

This commit is contained in:
nek0 2015-10-18 02:52:27 +02:00
parent a410e8607b
commit e44d5e4ee1
3 changed files with 8 additions and 12 deletions

View file

@ -151,7 +151,6 @@ deleteIndexES input = do
runBH' action = do
master <- getYesod
let s = appSearchHost $ appSettings master
let p = show $ appSearchPort $ appSettings master
let server = Server $ T.pack $ (T.unpack s) ++ ":" ++ show p
let server = Server s
manager <- liftIO $ newManager defaultManagerSettings
runBH (BHEnv server manager) action

View file

@ -76,7 +76,6 @@ data AppSettings = AppSettings
, appTos2 :: Text
-- ^ Terms of Service
, appSearchHost :: Text
, appSearchPort :: Int
, appShards :: Int
, appReplicas :: Int
-- ^ Settings for Elasticsearch
@ -112,7 +111,6 @@ instance FromJSON AppSettings where
appTos2 <- o .: "tos2"
appSearchHost <- o .: "searchhost"
appSearchPort <- o .: "searchport"
appShards <- o .: "shards"
appReplicas <- o .: "replicas"

View file

@ -53,7 +53,6 @@ tos1: "Terms of Service 1"
tos2: "Terms of Service 2"
# Elasticsearcha settings
searchhost: "localhost"
searchport: 9200
searchhost: "http://localhost:9200"
shards: 1
replicas: 2