Access payload from payload_delimiter in scoring script


I have trouble doing something like this, in es7.
Can anyone help me, on how to access the payloads, from payload_delimiter, from my script_score?

for (term: my_terms) { 
    termInfo = _index['text'].get(term,_PAYLOADS ); 
    for (pos : termInfo) { 
        score = score +  pos.payloadAsFloat(0);
return score;

I am using painless, as it is default scripting language

Any help will be greatly appreciated

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