I needed to create a function in Painless to perform multiple field checks of a document and return if a value is in a range of 0 to 2. This Painless script uses parameters with names, such as 'current_timestamp', which are entered manually.
Is possible use this script in a search in ElasticSearch when it is made using only Lucene Query and not the default JSON of the ES?
I tried to perform a search that way, but it doesn't work.
{
"from": 0,
"size": 30,
"sort": {
"id": {
"order": "desc"
}
},
"query": {
"query_string": {
"query": "isvalid({current_timestamp:1538081255011}):2"
}
}
}