In a 'function_score', functions may have a filter and a weight.
This commit wraps around the existing Function enum by creating
a FilteredFunction struct, which contains both a function and a filter.
This is explained in the Elasticsearch documentation. Here is an example
"function_score": { "query": { "match_all": {} }, "boost": "5", "functions": [ { "filter": { "match": { "test": "bar" } }, "random_score": {}, "weight": 23 }, { "filter": { "match": { "test": "cat" } }, "weight": 42 } ],
In a 'function_score', functions may have a filter and a weight. This commit wraps around the existing Function enum by creating a FilteredFunction struct, which contains both a function and a filter.
This is explained in the Elasticsearch documentation. Here is an example
"function_score": { "query": { "match_all": {} }, "boost": "5", "functions": [ { "filter": { "match": { "test": "bar" } }, "random_score": {}, "weight": 23 }, { "filter": { "match": { "test": "cat" } }, "weight": 42 } ],