git.iko.soy/typeable/bloodhound
on master help sign in
Merge pull request #13 from borisyukd/status_fix

fix status request

commiteb0a6e032f90e8ed0b769bffe4ba94176d371b1e authorChris Allen <cma@bitemyapp.com> dateWed 20 Aug 2014, 12:21 (12 years ago) parent45309ae758d06b
1 file changed+2−2
Database/Bloodhound/Types.hs+2−2
Database/Bloodhound/Types.hs+2−2
@@ -173,7 +173,7 @@ data Version = Version { number :: Text
173173 <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-status.html#indices-status>
174174-}
175175
176−data Status = Status { ok :: Bool
176+data Status = Status { ok :: Maybe Bool
177177 , status :: Int
178178 , name :: Text
179179 , version :: Version
@@ -1509,7 +1509,7 @@ instance FromJSON DocId
15091509
15101510instance FromJSON Status where
15111511 parseJSON (Object v) = Status <$>
1512− v .: "ok" <*>
1512+ v .:? "ok" <*>
15131513 v .: "status" <*>
15141514 v .: "name" <*>
15151515 v .: "version" <*>