karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-5793) Provide an option replace the dot or not in json field in the JsonMarshaller
Date Thu, 30 Aug 2018 07:02:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597126#comment-16597126
] 

Jean-Baptiste Onofré commented on KARAF-5793:
---------------------------------------------

I agree with [~fpapon]. However, as it's a minor change in the default marshaller (just choosing
between . or _), it's acceptable to define the behavior by configuration (even if I'm not
a big fan of introducing a config just for the marshaller). Generally speaking, [~fpapon]
is right for deeper/more global change: a custom marshaller is a better option (especially
now that we can pick up the marshaller service in the appender configuration).

> Provide an option replace the dot or not in json field in the JsonMarshaller
> ----------------------------------------------------------------------------
>
>                 Key: KARAF-5793
>                 URL: https://issues.apache.org/jira/browse/KARAF-5793
>             Project: Karaf
>          Issue Type: Improvement
>          Components: decanter
>    Affects Versions: decanter-2.0.0
>            Reporter: Xilai Dai
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: decanter-2.1.0
>
>
> The dot "." is replaced by "_" in json fields after changes from KARAF-4295. The reason
could be that the field names containing dots will be rejected in ES 2.x (https://github.com/elastic/elasticsearch/issues/15951).
but ES 5.x, 6.x support it again (parse it as Object). see https://www.elastic.co/guide/en/elasticsearch/reference/2.4/dots-in-names.html#_enabling_support_for_dots_in_field_names
. Also there is an ENV option provided by ES to allow dots in the field name:  
> {code}
> export ES_JAVA_OPTS="-Dmapper.allow_dots_in_name=true"
> {code}
> To give more compatibility and flexibility to the user, we may provide an option "replaceDotInFields=true/false"
for the Json Marshaller. for now any custom fields name with "." woud be replaced by "_" silently.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message