Painless Scripting Language

Hi Experts,

I'm working on my project which is using Painless Scripting Language for Script Query. But I got problem when i execute the query as bellow:
{
"query": {
"bool": {
"must": {
"script": {
"script": {
"inline": "doc['text'].value =~ /test/i",
"lang": "painless"
}
}
}
}
}
}

But when i replace /test/i by /est/i it got the result as expected. I don't know why value is test is not OK :frowning:. It seems that test is the keyword of painless.

Please help me to resolve this issue.

Thank you so much

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