Hi,
i am using value count aggragtion and with the script, pfb the script
"script": {
"lang": "painless",
"source": "for(int i=0; i<1; i++){if(doc['message.code'].size() >0 && doc['message.code'].value >= 300){doc['message.code'].value}}"
}
it is showing error as invalid argument exception. if i remove the for loop it is giving result but it will not give the expected result.
Can you explain what you are trying to achieve with the for loop. As far as I can see, the i variable from the loop is not used anywhere and that loop is only looping once through the inner code, so I would expect the same output with and without the loop.
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.