I'm trying to create a script to modify the score of my queries.
I want to access the position of a word in the results I am obtaining.
For example the word: "global" in the string name= "Global corporation". So I want to know that global is the position: 1
I'm doing it with painless :
But I am obtaining compling errors with : Possition. (Global is the word I want to know the possition). This is just a try to see if I can obtain the position of a word . I have performed
And I can see that the position of the tokens are stored there.
How can I acess that value in my script?