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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.22.1
    • Fix Version/s: 2.23.0
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: