Add mapping so aggregation works in ES 5.x
This commit is contained in:
parent
6492f3a5e3
commit
b04496cc3e
10
goes_test.go
10
goes_test.go
@ -1037,6 +1037,16 @@ func (s *GoesTestSuite) TestAggregations(c *C) {
|
|||||||
"index.number_of_shards": 1,
|
"index.number_of_shards": 1,
|
||||||
"index.number_of_replicas": 0,
|
"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)
|
defer conn.DeleteIndex(indexName)
|
||||||
|
Loading…
Reference in New Issue
Block a user