Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12912

Action Request Converter is reseting ID on index request to header that is not set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.22.1
    • 2.23.0
    • 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. 

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            tim.sexton Tim Sexton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: