Access payload from payload_delimiter in scoring script

Hi

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?

score=0; 
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
Jens

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