@@ -177,47 +177,44 @@ data ParentMapping = ParentMapping deriving (Eq, Show)
178instance ToJSON ParentMapping where
178instance ToJSON ParentMapping where
179 toJSON ParentMapping =
179 toJSON ParentMapping =
181− object ["properties" .=
180+ object ["properties" .=
182− object [ "user" .= object ["type" .= ("string" :: Text)]
181+ object [ "user" .= object ["type" .= ("string" :: Text)]
183− -- Serializing the date as a date is breaking other tests, mysteriously.
182+ -- Serializing the date as a date is breaking other tests, mysteriously.
184− -- , "postDate" .= object [ "type" .= ("date" :: Text)
183+ -- , "postDate" .= object [ "type" .= ("date" :: Text)
185− -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
184+ -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
186− , "message" .= object ["type" .= ("string" :: Text)]
185+ , "message" .= object ["type" .= ("string" :: Text)]
187− , "age" .= object ["type" .= ("integer" :: Text)]
186+ , "age" .= object ["type" .= ("integer" :: Text)]
188− , "location" .= object ["type" .= ("geo_point" :: Text)]
187+ , "location" .= object ["type" .= ("geo_point" :: Text)]
191data ChildMapping = ChildMapping deriving (Eq, Show)
190data ChildMapping = ChildMapping deriving (Eq, Show)
193instance ToJSON ChildMapping where
192instance ToJSON ChildMapping where
194 toJSON ChildMapping =
193 toJSON ChildMapping =
196− object ["_parent" .= object ["type" .= ("parent" :: Text)]
194+ object ["_parent" .= object ["type" .= ("parent" :: Text)]
197− , "properties" .=
195+ , "properties" .=
198− object [ "user" .= object ["type" .= ("string" :: Text)]
196+ object [ "user" .= object ["type" .= ("string" :: Text)]
199− -- Serializing the date as a date is breaking other tests, mysteriously.
197+ -- Serializing the date as a date is breaking other tests, mysteriously.
200− -- , "postDate" .= object [ "type" .= ("date" :: Text)
198+ -- , "postDate" .= object [ "type" .= ("date" :: Text)
201− -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
199+ -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
202− , "message" .= object ["type" .= ("string" :: Text)]
200+ , "message" .= object ["type" .= ("string" :: Text)]
203− , "age" .= object ["type" .= ("integer" :: Text)]
201+ , "age" .= object ["type" .= ("integer" :: Text)]
204− , "location" .= object ["type" .= ("geo_point" :: Text)]
202+ , "location" .= object ["type" .= ("geo_point" :: Text)]
207data TweetMapping = TweetMapping deriving (Eq, Show)
205data TweetMapping = TweetMapping deriving (Eq, Show)
209instance ToJSON TweetMapping where
207instance ToJSON TweetMapping where
210 toJSON TweetMapping =
208 toJSON TweetMapping =
212− object ["properties" .=
209+ object ["properties" .=
213− object [ "user" .= object ["type" .= ("string" :: Text)]
210+ object [ "user" .= object ["type" .= ("string" :: Text)]
214− -- Serializing the date as a date is breaking other tests, mysteriously.
211+ -- Serializing the date as a date is breaking other tests, mysteriously.
215− -- , "postDate" .= object [ "type" .= ("date" :: Text)
212+ -- , "postDate" .= object [ "type" .= ("date" :: Text)
216− -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
213+ -- , "format" .= ("YYYY-MM-dd`T`HH:mm:ss.SSSZZ" :: Text)]
217− , "message" .= object ["type" .= ("string" :: Text)]
214+ , "message" .= object ["type" .= ("string" :: Text)]
218− , "age" .= object ["type" .= ("integer" :: Text)]
215+ , "age" .= object ["type" .= ("integer" :: Text)]
219− , "location" .= object ["type" .= ("geo_point" :: Text)]
216+ , "location" .= object ["type" .= ("geo_point" :: Text)]
222exampleTweet :: Tweet
219exampleTweet :: Tweet
223exampleTweet = Tweet { user = "bitemyapp"
220exampleTweet = Tweet { user = "bitemyapp"