-
Notifications
You must be signed in to change notification settings - Fork 197
Auto-registered template doesn't support ElasticSearch 5 string types. #129
Comments
Thanks for reporting. Something we need to fix. Care for a PR? |
I just tried to make it work with ES 6.0, and there's more to it than just the string->text replacement. It seems that 'string' should stay at least in Furthermore, all Next thing, one I lack knowledge to properly fix, is Last thing I noticed is .. that in 6.x the Oh, and IIRC the string->text change will make the mapping incompatible with ES2.x.. so some way of detecting and switching mappings would be needed.. or at least config flag saying use-old-es2-dialect Anyways, I was able to conjure a custom mapping that writes to ES6.0, much of that was copied from current
and later:
It's pretty much totally untested, I just noticed it stopped receiving errors from ES and some events were recorded in ES. I wouldn't consider it as PR-ready at all, but maybe it will help someone to get their logging work in some shape on ES6.. or encourage somebody to extend it with some form of "_all" and make a PR :) |
Thanks for the pointers. We need to see how we want to support this. If this is breaking between the different ES versions, we might need to detect or offer a way to use the correct one. |
A PR for this: #142 |
PR is merged |
Does this issue relate to a new feature or an existing bug?
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
5.4
What is the target framework and operating system? See target frameworks & net standard matrix.
Please describe the current behavior?
The provided dynamic mapping for strings doesn't work for ElasticSearch 5.x. The raw field isn't being mapped at all.
It's using string type, as in
Please describe the expected behavior?
Should use 'text' and 'keyword', as per 5.x syntax.
The text was updated successfully, but these errors were encountered: