Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.22.1
-
None
-
Unknown
Description
Currently, the code in the Action Request Converter for the toIndexRequest method has this:
return createIndexRequest(document, exchange) .id(exchange.getIn().getHeader(ElasticsearchConstants.PARAM_INDEX_ID, String.class));
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.