Painless lang

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.

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