Closed gaoxingliang closed 7 months ago
It is a break change introduced by es 8.0+ due to removal of mapping types
.
The plugin eleasticsearch-logger is tested based on es 7.17.1. For now it may only support the version 7.x and the earlier.
@gaoxingliang Would you like to fix that issue?
We should ensure that the plugin supports all versions of es as much as possible.
If version 8.x of the elasticsearch REST API is not compatible with earlier versions (6.0+), 7.x compatibility headers
maybe a better solution.
CC @spacewander
It is a break change introduced by es 8.0+ due to
removal of mapping types
.The plugin eleasticsearch-logger is tested based on es 7.17.1. For now it may only support the version 7.x and the earlier.
@gaoxingliang Would you like to fix that issue?
Sorry. I don't know about the lua scripts.
@An-DJ Would you give it a try?
@An-DJ Are you planning to work on this?
I was using this plugin and ran into this issue. It works with the 7.17 version of Elasticsearch. If this is not being worked on now, can we mention this in the documentation? Add a note that says only 7.x is supported.
cc: @Revolyssup
I can look into this @shreemaan-abhishek can you assign me?
@gaoxingliang @An-DJ @pottekkat I am trying to implement the REST API compatibility headers.
Should we also change the elasticsearch
used for testing to 8.x
? Or would it be better to run tests on both the versions?
@gaoxingliang @An-DJ @pottekkat I am trying to implement the REST API compatibility headers. Should we also change the
elasticsearch
used for testing to8.x
? Or would it be better to run tests on both the versions?
if we can run on the 2 version may better , how do u think ? @shreemaan-abhishek
@lakshya8066 I think we can only run tests on 8.x. It does not seem to me that Elasticsearch is maintaining multiple versions.
Okay, I think we can also implement 7.x compatibility headers and then test the plugin on version 8.x
. This will prevent error logs in case someone uses version 7.x
of elasticsearch.
Nice catch. Sounds like a good solution.
Sure, will work on a PR for this.
Okay, I think we can also implement 7.x compatibility headers and then test the plugin on version
8.x
. This will prevent error logs in case someone uses version7.x
of elasticsearch.
agree with this way, it LGTM
@pottekkat I am not sure why the CI is not passing for me. As I understand the, the failing test cases do not contain field.type
parameter in the config, so it should be working fine on version 8 as well.
@lakshya8066 Let me rerun the CI and check.
@pottekkat any update on this?
Current Behavior
The plugin eleasticsearch-logger is not working with elasticseachr-8.x and apisix - 3.0.0 and in apisix it has below error log:
the plugin conf is referenced to the doc url: https://apisix.apache.org/docs/apisix/plugins/elasticsearch-logger/ and my conf is:
I also tried with es 6.0 and same conf as above. it shows error:
Updates:
It seems the _type is deprecated in es: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/mapping-type-field.html#mapping-type-field After removed the type in the conf. It worked.
Expected Behavior
The elasticsearch logger plugin should work with es 8.x version.
Error Logs
See above.
Steps to Reproduce
Environment