Painless Script with name contain dot

Hi,
I have field name with dot. like param.request_id, this is actual field name and not

Actual:

{
   "param.request_id": 12343
}

Not like

{
 "param" : { 
   "request_id": 12343
  }
}

. when i try scripted filed

if (doc.containsKey('param.request_id'))  { 
    doc['param.request_id.keyword'].value 
}

However this code don't return any doc, instead it failed with script exception. is there a way to escape dot

Hi. Have you tried to access the field as suggested in Fields with a "dot" in them do not persist ?

Thanks for the reference, i still have error due to this field is not available in all documents, basically i have query param extracted out as param.request_id or in other case i have param.input_id
in my product they all mean the same thing so i want to point to product page link reference this unique id, and in kibana table i want to refer it as one derived field.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.