From b04496cc3e2a64c5eb4dd678e4eeec19b6cfd6cc Mon Sep 17 00:00:00 2001 From: Paul Bonser Date: Thu, 2 Feb 2017 14:50:25 -0600 Subject: [PATCH] Add mapping so aggregation works in ES 5.x --- goes_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/goes_test.go b/goes_test.go index 208ca27..f9c0835 100644 --- a/goes_test.go +++ b/goes_test.go @@ -1037,6 +1037,16 @@ func (s *GoesTestSuite) TestAggregations(c *C) { "index.number_of_shards": 1, "index.number_of_replicas": 0, }, + "mappings": map[string]interface{}{ + docType: map[string]interface{}{ + "properties": map[string]interface{}{ + "user": map[string]interface{}{ + "type": "string", + "index": "not_analyzed", + }, + }, + }, + }, } defer conn.DeleteIndex(indexName)