From de835bce3a5c0fcf001b6735da38375c5badd772 Mon Sep 17 00:00:00 2001 From: John Galt Date: Tue, 28 Jul 2015 18:34:15 -0400 Subject: [PATCH] Fixed bug with IndexSettings serialization --- src/Database/Bloodhound/Types.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Database/Bloodhound/Types.hs b/src/Database/Bloodhound/Types.hs index e33d917..71e83d7 100644 --- a/src/Database/Bloodhound/Types.hs +++ b/src/Database/Bloodhound/Types.hs @@ -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