git.iko.soy/typeable/bloodhound
on master help sign in
Merge pull request #245 from ptillemans/fix_example

Fix error in example code

commit0c0d4009fbb51fcafa19065478bacc465c7ccded authorChris Allen <cma@bitemyapp.com> dateMon 4 Feb 2019, 09:53 (8 years ago) parente84bf7028386b0
1 file changed+1−1
examples/Tweet.hs+1−1
examples/Tweet.hs+1−1
@@ -83,7 +83,7 @@ main = runBH' $ do
8383 True <- indexExists aliasName
8484
8585 -- create a template so that if we just write into an index named tweet-2017-01-02, for instance, the index will be automatically created with the given mapping. This is a great idea for any ongoing indices because it makes them much easier to manage and rotate.
86− let idxTpl = IndexTemplate (TemplatePattern "tweet-*") (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping]
86+ let idxTpl = IndexTemplate (TemplatePattern "tweet-*") (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [object ["tweet" .= toJSON TweetMapping]]
8787 let templateName = TemplateName "tweet-tpl"
8888 _ <- putTemplate idxTpl templateName
8989 True <- templateExists templateName