I have jenkins logs in a json format. (taken with the API)
the logs have different types of value to the same key:
and more. when try to upload them using elastic-python, I got this error:
BadRequestError(400, 'illegal_argument_exception', 'mapper [actions.parameters.value] cannot be changed from type [text] to [boolean]')
I do some digging, but didn't find a solution for that.
any idea what I can do to upload the json successfully?
The issue here is that you didn't explicitly mapped the fields, so Elasticsearch will try to map it according to the first value it receives for any field, in your case it received a value of true or false and then mapped the field as a boolean field, but you have other documents where the value of this field can be something else.
You will need to map the field as keyword since it can has values that are not only true or false.