From 28386b04d2d75a2080ad4ab3dd0bc77ce784d96c Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Sat, 27 Oct 2018 11:26:17 +0200 Subject: [PATCH] add mapping name when creating template --- examples/Tweet.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Tweet.hs b/examples/Tweet.hs index e7af76c..f2033c6 100644 --- a/examples/Tweet.hs +++ b/examples/Tweet.hs @@ -83,7 +83,7 @@ main = runBH' $ do True <- indexExists aliasName -- 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. - let idxTpl = IndexTemplate (TemplatePattern "tweet-*") (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [toJSON TweetMapping] + let idxTpl = IndexTemplate (TemplatePattern "tweet-*") (Just (IndexSettings (ShardCount 1) (ReplicaCount 1))) [object ["tweet" .= toJSON TweetMapping]] let templateName = TemplateName "tweet-tpl" _ <- putTemplate idxTpl templateName True <- templateExists templateName