Hello,
I'm getting a compile error when using regex patterns inside a scripted field. I couldn't figure out why this error is happening though, since I'm pretty sure the script is right, based on the docs.
Here is the error:
"root_cause": [
{
"type": "script_exception",
"reason": "compile error",
"script_stack": [
"... ate'].value;\nPattern p = /SJC/;\n\n// lp =~ p \n\nlp",
" ^---- HERE"
],
"script": "def lp = doc['last_breadcrumbs_sorting_record.destination.license_plate'].value;\nPattern p = /SJC/;\n\n// lp =~ p \n\nlp",
"lang": "painless",
"position": {
"offset": 93,
"start": 68,
"end": 116
}
},
And this is an example document:
{
"_id": "3268105",
"last_breadcrumbs_sorting_record": {
"destination": {
"license_plate": "SJC20200623088"
}
},
Im using kibana's scripted field editor, running on v 7.8.1
Tks