git.iko.soy/typeable/bloodhound
on master help sign in
Fixed bug with IndexSettings serialization
commitde835bce3a5c0fcf001b6735da38375c5badd772 authorJohn Galt <centromere@users.noreply.github.com> dateTue 28 Jul 2015, 18:34 (11 years ago) parent85bbc62
1 file changed+5−1
src/Database/Bloodhound/Types.hs+5−1
src/Database/Bloodhound/Types.hs+5−1
@@ -2033,7 +2033,11 @@ instance FromJSON Status where
20332033
20342034
20352035instance ToJSON IndexSettings where
2036− toJSON (IndexSettings s r) = object ["settings" .= object ["shards" .= s, "replicas" .= r]]
2036+ toJSON (IndexSettings s r) = object ["settings" .=
2037+ object ["index" .=
2038+ object ["number_of_shards" .= s, "number_of_replicas" .= r]
2039+ ]
2040+ ]
20372041
20382042instance ToJSON IndexTemplate where
20392043 toJSON (IndexTemplate p s m) = merge