Painless lang


(radi) #1

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


(Adrien Grand) #2

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.


(system) #3

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