git.iko.soy/typeable/bloodhound
on master help sign in
url query encoding bug
a4a1575Josh Berman
bloodhound.cabal+1−1
@@ -1,5 +1,5 @@
1name: bloodhound
1name: bloodhound
2−version: 0.7.1.0
2+version: 0.7.1.1
3synopsis: ElasticSearch client library for Haskell
3synopsis: ElasticSearch client library for Haskell
4description: ElasticSearch made awesome for Haskell hackers
4description: ElasticSearch made awesome for Haskell hackers
5homepage: https://github.com/bitemyapp/bloodhound
5homepage: https://github.com/bitemyapp/bloodhound
src/Database/Bloodhound/Client.hs+9−9
@@ -173,16 +173,16 @@ joinPath ps = do
173 return $ joinPath' (s:ps)
173 return $ joinPath' (s:ps)
174
174
175appendSearchTypeParam :: Text -> SearchType -> Text
175appendSearchTypeParam :: Text -> SearchType -> Text
176−appendSearchTypeParam originalUrl st = addQuery [(keyEq, Just stParams)] originalUrl
176+appendSearchTypeParam originalUrl st = addQuery params originalUrl
177− where keyEq = "search_type="
177+ where stText = "search_type"
178− stParams
178+ params
179− | st == SearchTypeDfsQueryThenFetch = "dfs_query_then_fetch"
179+ | st == SearchTypeDfsQueryThenFetch = [(stText, Just "dfs_query_then_fetch")]
180− | st == SearchTypeCount = "count"
180+ | st == SearchTypeCount = [(stText, Just "count")]
181− | st == SearchTypeScan = "scan&scroll=1m"
181+ | st == SearchTypeScan = [(stText, Just "scan"), ("scroll", Just "1m")]
182− | st == SearchTypeQueryAndFetch = "query_and_fetch"
182+ | st == SearchTypeQueryAndFetch = [(stText, Just "query_and_fetch")]
183− | st == SearchTypeDfsQueryAndFetch = "dfs_query_and_fetch"
183+ | st == SearchTypeDfsQueryAndFetch = [(stText, Just "dfs_query_and_fetch")]
184 -- used to catch 'SearchTypeQueryThenFetch', which is also the default
184 -- used to catch 'SearchTypeQueryThenFetch', which is also the default
185− | otherwise = "query_then_fetch"
185+ | otherwise = [(stText, Just "query_then_fetch")]
186
186
187-- | Severely dumbed down query renderer. Assumes your data doesn't
187-- | Severely dumbed down query renderer. Assumes your data doesn't
188-- need any encoding
188-- need any encoding