We have a message field called ‘status’ which can have either number(200) or string (‘Pending’).
Currently we are using elasicsearch dynamic mapping and due to this we are getting numberFormat exceptions whenever we have string data to status field.
When first message comes with status field value 200 to elasticsearch, it maps this field with data type as long. later after if status field get some string data then we will have numberFormat exception.
Tried below solutions,
- We tried to change the status field mapping on elasticsearch, but unable to convert field type from long to text
- We have looked around changing default static mapping from graylog2, but this limits us to have fixed set of fields in the log.
Please let us know for the best approach in order to solve this issue.