Skip to content

Conversation

@deric
Copy link

@deric deric commented Aug 10, 2020

In order to be compatible with recent Elastic versions document type information should not be defined or _doc type could be used.

_doc is a dummy document type that will work as well with older Elastic versions

See: https://www.elastic.co/guide/en/elasticsearch/reference/7.x/removal-of-types.html

@trink
Copy link
Contributor

trink commented Aug 10, 2020

Changing the defaults is a breaking change for anyone using pre v7. Ideally the encoder would accept a version and then apply the correct defaults (the version should default to 5 (when nil) since that is what this encoder was originally created against).

Also the elasticsearch package version needs to be incremented 1.0.9
https://github.com/mozilla-services/lua_sandbox_extensions/blob/master/elasticsearch/CMakeLists.txt#L6

@deric
Copy link
Author

deric commented Aug 10, 2020

@trink You're right, it would be a breaking change for anyone relying on default values. I wasn't sure how to get the Elastic version, alternatively we could send GET elasticsearch:9200 and parse the version... but then the type would be determined upon connection to Elastic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants