I'm trying to add the Page Rank to the score of a document, adjusted by date decay. I know I can multiply the Rank and Date Decay together with a "score_mode": "multiply"
, but I have other factors that I want summed, and I'm not sure how to break up the different ways I want portions scored and collected.
For example, lets say I'd like score to be:
score = _score + hierarchical_weight + rank*decay
I have only be able to figure out up this point
score = _score + hierarchical_weight + rank + decay
As demonstrated with the following query
{
"query": {
"function_score": {
"functions": [
{
"field_value_factor": {
"field": "hierarchical_weight",
"factor": 1,
"modifier": "none",
}
},
{
"field_value_factor": {
"field": "rank",
"factor": 1,
"modifier": "none",
}
},
{
"exp": {
"date": {
"origin": "now",
"scale": "365d",
"decay": 0.5
}
},
}
],
"score_mode": "sum",
"boost_mode": "sum",
"query": {
"bool": {
"should": [
{
"match": {[. . . truncated . . .]
Any help would be greatly appreciated