You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2018/11/09 07:21:00 UTC

[jira] [Resolved] (CAMEL-12912) Action Request Converter is reseting ID on index request to header that is not set

     [ https://issues.apache.org/jira/browse/CAMEL-12912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-12912.
--------------------------------------
    Resolution: Fixed

> Action Request Converter is reseting ID on index request to header that is not set
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-12912
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12912
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-elasticsearch-rest
>    Affects Versions: 2.22.1
>            Reporter: Tim Sexton
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 2.23.0
>
>
> Currently, the code in the Action Request Converter for the toIndexRequest method has this: 
> {code:java}
> return createIndexRequest(document, exchange)
> .id(exchange.getIn().getHeader(ElasticsearchConstants.PARAM_INDEX_ID, String.class));
> {code}
> when this method is used it will always set the ID to that header (which is not being set at an earlier time in the code) which will cause the ID to be null (which is a problem for external version types) 
>  
> This header either needs to be set earlier in the code or the id needs to be set a different way.  
> Another way to handle this could be just to put in the documentation that if you want to set a custom id you will need to use this header. 



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