Multiple field_value_factors in function_score?

(AS) #1


From the docs it's not clear if and how I can have multiple
field_value_factors inside a function_score. I would like to boost by
ratingCount and by averageRating. I was expecting something like this:

"query": {
    "function_score": {
        "query" : {
        "field_value_factor": {
            "field": "ratingCount",
            "modifier": "log1p"
        "field_value_factor": {
            "field": "avgRating",
            "modifier": "log1p"

What's the correct syntax for this, or what are (better) alternatives?


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit


Any luck with this?

(Moises Garcia Marquez) #3

Trying to do exactly the same. Did you have any luck?

(system) #4