This works
GET indexname/_search
{
"query": {
"script": {
"script": "doc['fieldName'].value?.length() ==3"
}
}
}
But with < and > operator it does not work
GET indexname/_search
{
"query": {
"script": {
"script": "doc['fieldName'].value?.length() > 3"
}
}
}
fieldName is of String Type.
I am using ElasticSearch 5.3.
Hi,
it'd be helpful if you could tell us more about the problem occurring with the second query.
Also, just to make it sure, the type of fieldName is string or text?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.