Describe the issue:
I have the following query with the following result
{
“_shards”: {
“total”: 1,
“failed”: 0,
“successful”: 1,
“skipped”: 0
},
“hits”: {
“hits”: [
{
“_index”: “test”,
“_source”: {
“spanId”: “4b61492ba”,
“traceId”: “3fff76dbd529c1a4deebb8e636a”,
“resource”: {
“service.name”: “test.test”
},
“body”: “Processing saleability.HIE_CRE_NodeTopDown, #100 record(s)”
},
“_id”: “1W0DL5MBz8YSiFzRSp-E”,
“_score”: 0
}
],
“total”: {
“value”: 18,
“relation”: “eq”
},
“max_score”: 0
},
“took”: 1,
“timed_out”: false
}
I’m trying to get the value {{ctx.results.0.hits.hits.0._source.resource.service.name}} but it returns a blank value.
I have tried to extract other items from the query and it does return the values for example BODY, SPAN ID TRACE ID, but service.name is blank
{{#ctx.results.0.hits.hits}}
Body:{{_source.body}} \n
Service Name: {{_source.resource.service.name}} \n
Span ID: {{_source.spanId}} \n
Trace ID: {{_source.traceId}} \n
{{/ctx.results.0.hits.hits}} \n
Full Result:{{ctx.results}}",
What am I doing wrong?