git.iko.soy/typeable/bloodhound
on master help sign in
Fixed bug with IndexSettings serialization
de835bcJohn Galt
src/Database/Bloodhound/Types.hs+5−1
@@ -2033,7 +2033,11 @@ instance FromJSON Status where
2033
2033
2034
2034
2035instance ToJSON IndexSettings where
2035instance 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+ ]
2037
2041
2038instance ToJSON IndexTemplate where
2042instance ToJSON IndexTemplate where
2039 toJSON (IndexTemplate p s m) = merge
2043 toJSON (IndexTemplate p s m) = merge