Hi ,
I have a document like below -
Here items made nested in the mapings.
{
"shopName" : "royal super market",
"geo": "1.234,2.121",
"items": [
{
"name": "rubber",
"relevancy": 20
},
{
"name": "pen",
"relevancy": 10
}
]
}
Here i want to query on shopName , filter based on certain items and then score document based on geo and matched item names relevancy field.
I was hoping to push everything to functions in function score query.
But i cant seem to find anyway to get relevancy field value inside functions function of function_score.
Script does not seem to be able to pick values from inside nested object ( that is without touching _source )
Let me know if there is any method to do this ?
Thanks
Vineeth