hello, i want help to correct this script on lang:painless please
if (doc['filed].value!= null) { forEach(function(result){ def users = result.doc['filed].value; def arr = []; for(def user in users){ arr.push(user); } retunr arr.length; } }
thank's
Please explain what the problem is so that we can help you. You will probably want to check out the painless docs: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/modules-scripting-painless.html.
© 2020. All Rights Reserved - Elasticsearch
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.