Fixed bug with IndexSettings serialization

This commit is contained in:
John Galt 2015-07-28 18:34:15 -04:00
parent 85bbc620f4
commit de835bce3a

View File

@ -2033,7 +2033,11 @@ instance FromJSON Status where
instance ToJSON IndexSettings where
toJSON (IndexSettings s r) = object ["settings" .= object ["shards" .= s, "replicas" .= r]]
toJSON (IndexSettings s r) = object ["settings" .=
object ["index" .=
object ["number_of_shards" .= s, "number_of_replicas" .= r]
]
]
instance ToJSON IndexTemplate where
toJSON (IndexTemplate p s m) = merge