# Painless Scripting Language

**URL:** <https://discuss.elastic.co/t/painless-scripting-language/71036>\
**Category:** Elasticsearch\
**Created:** [January 10, 2017, 8:27am UTC](https://discuss.elastic.co/t/painless-scripting-language/71036 "2017-01-10T08:27:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonpv1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sonpv1/32/16266_2.png) [@sonpv1](https://discuss.elastic.co/u/sonpv1)\
**Post date:** [January 10, 2017, 8:27am UTC](https://discuss.elastic.co/t/painless-scripting-language/71036/1 "2017-01-10T08:27:41Z")

</div>

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 ☹. It seems that test is the keyword of painless.

Please help me to resolve this issue.

Thank you so much

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 7, 2017, 8:28am UTC](https://discuss.elastic.co/t/painless-scripting-language/71036/2 "2017-02-07T08:28:13Z")

</div>

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