You'd want to do something like this and you may want to consider using field value factor:
{
"query": {
"filtered": {
"query": {
"nested": {
"path": "reviews",
"query": {
"function_score": {
"query": {
"term": {
"reviews.userId": {
"value": "1"
}
}
},
"functions": [
{
"field_value_factor": {
"field": "reviews.rating"
}
}
]
}
}
}
}
}
}
}