Hello,
We are indexing and parsing logfiles containing JSON requests (one per line). We have multiple, completely different request. Most of them can be indexed without any problems. But we have some requests which include a field with the same name once as concrete value and once as object.
Example (simplified request):
{ "request": { "body": { "price": { "currency": "CHF", "value": 100.20 } } } }
or
{ "request": { "body": { "price": 100 } } }
Depending which type of request was indexed first, one or the other cannot be indexed with the following error:
"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [response.body.price] tried to parse field [price] as object, but found a concrete value"
Is there a way to create an index/template to index the price field as object and once as concrete value?
Unfortunately we are not able to change all different types of requests to be indexed, but we are free to change the template.
Best regards,
Tom