Open liyongjian5179 opened 3 years ago
The maintainer of es is @rralcala. You can contact with @rralcala about the change of mapping type.
@rralcala Hey, Bro. Could you help to check this issue?
I'll take a look, and set the default to _doc if needed, just need to ensure we don't break existing users, because I think that if you were using es < 7 and upgraded then this is not enforced, so, we could potentially cause problems for those people.
Thank you for your answer, our company is now ES =7, and the use of '_doc' is mandatory, and the index is created through the index template, not through kube-Eventer.
My solution now is to change the typeName in the code
kube-eventer/common/elasticsearch/mapping.go:192 "_doc": {
kube-eventer/sinks/elasticsearch/driver.go:31 typeName = "_doc"
And compile the code and rebuild the container image Now the alias is index-xxxx-_doc
Will support es=8 be considered in the future? Because in 8, 'mappingTypes' will be removed
I think kube-Eventer should do some feature adaptation for different ES versions. What do you think?
https://github.com/AliyunContainerService/kube-eventer/blob/509eaa03b1/sinks/elasticsearch/driver.go#L31
可否考虑将es7 中 mapping 的type 从
events
改成默认_doc
或者根据下面的链接,去除掉 typehttps://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#_schedule_for_removal_of_mapping_types