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 runBH' action = do
master <- getYesod master <- getYesod
let s = appSearchHost $ appSettings master let s = appSearchHost $ appSettings master
let p = show $ appSearchPort $ appSettings master let server = Server s
let server = Server $ T.pack $ (T.unpack s) ++ ":" ++ show p
manager <- liftIO $ newManager defaultManagerSettings manager <- liftIO $ newManager defaultManagerSettings
runBH (BHEnv server manager) action runBH (BHEnv server manager) action

View file

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

View file

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