scrive / log

Structured logging solution.
https://hackage.haskell.org/package/log-base
BSD 3-Clause "New" or "Revised" License
35 stars 7 forks source link

V5: Replace string with text/keyword #44

Closed linearray closed 5 years ago

linearray commented 6 years ago

On our production server with elasticsearch 5.6.10 we see a lot of this in the logs:

[2018-08-21T00:00:17,240][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [domain] [2018-08-21T00:00:17,243][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [level] [2018-08-21T00:00:17,244][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [component] [2018-08-21T00:00:17,244][WARN ][o.e.d.i.m.StringFieldMapper$TypeParser] The [string] field is deprecated, please use [text] or [keyword] instead on [message]

This deprecation is described here: https://www.elastic.co/blog/strings-are-dead-long-live-strings

And the code is here: https://github.com/scrive/log/blob/master/log-elasticsearch/src/Log/Backend/ElasticSearch/V5.hs#L249

Referring to the article above, does the section on "Backward compatibility" mean we can simply replace string with text/keyword without breaking anything?