Hi guys,
I'm not able to find yet what I'm doing wrong here. So, this is the scenario:
1. Config set (script.painless.regex.enabled: true)
2. The Field I'm interested is called "DESCRIPTION".
3. I've tried these queries:
3.1:
{
"script": {
"lang": "painless",
"source": "if (ctx._source.DESCRIPTION ==~ /[^aeiou].[aeiou]/) {return 'a'} else {return 'b'}"
}
}
3.2:
{
"script": {
"lang": "painless",
"source": "if (ctx._source.DESCRIPTION ==~ /[^aeiou].[aeiou]/) {return 'a'} else {return 'b'}"
}
}
4. In both attempts, I've got this error:
"type": "parsing_exception",
"reason": "Unknown key for a START_OBJECT in [script].",
Any ideas?