Using inner nested object in field value factor query

I have a scenario where I want to order the results depending on their popularity. The popularity is present as part of nested object.

To explain the problem, let's say i have a user data and as part of user data, i have information about user's fav skills. We collect the score of user's skill as part of separate process. I want to use the score of these skills as popularity factor in my scoring. I also need to ensure that new users are given priority above old users

my current query is as follows

{
"query": {
"function_score": {
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": "hibernate",
"fields": [
"user_about^1.0",
"user_interests^1.0"
],
"type": "best_fields"
}
}
]
}
},
"functions": [
{
"filter": {
"match_all": {
"boost": 1
}
},
"exp": {
"creationDate": {
"origin": "2017-03-02T01:19:48.641Z",
"scale": "5d",
"decay": 0.5
},
"multi_value_mode": "MIN"
}
},
{
"filter": {
"nested": {
"query": {
"match": {
"skills.skill_name": {
"query": "hibernate"
}
}
},
"path": "skills"
"score_mode": "avg",
"boost": 1
}
},
"field_value_factor": {
"field": "skills.skill_score",
"factor": 1,
"modifier": "ln1p"
}
}
]
}
},
"sort": [
{
_"score": {
"order": "desc"
}
}
]
}

When i run this query, i get an error mentioning
Missing value for field [skills.skill_score].

How should i modify my query to accomplish my task.

Thanks

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