git.iko.soy/typeable/bloodhound
on master help sign in
Fix an example.

No need to specify mapping name twice, since `putMapping` does `PUT /$INDEXNAME/_mappings/$MAPPINGNAME`. In fact, specifying the mapping name here breaks upsert semantics (you get `Root type mapping not empty after parsing!` exception).

commit288d0cb7874f0d830e2df336ff43d50c08140d24 authorMikhail Glushenkov <mikhail.glushenkov@gmail.com> dateMon 3 Oct 2016, 11:07 (10 years ago) parent6fbdfb7
1 file changed+3−4
README.md+3−4
README.md+3−4
@@ -181,10 +181,9 @@ data TweetMapping = TweetMapping deriving (Eq, Show)
181181:{
182182instance ToJSON TweetMapping where
183183 toJSON TweetMapping =
184− object ["tweet" .=
185− object ["properties" .=
186− object ["location" .=
187− object ["type" .= ("geo_point" :: Text)]]]]
184+ object ["properties" .=
185+ object ["location" .=
186+ object ["type" .= ("geo_point" :: Text)]]]
188187:}
189188
190189resp <- withBH' $ putMapping testIndex testMapping TweetMapping