Closed
Description
Using script_score
throws ValueError(Q() can only accept dict with a single query...
{
"query": {
"script_score": {
"query": {
"match_all": {}
},
"script": {
"source": """
double weight = 1;
if (doc['type'].value == 'REVIEW') {
weight = 1.03;
}
return weight * decayDateExp(params.origin, params.scale, params.offset, params.decay, doc['modified'].value);
""",
"params": {
"origin": "2020-10-30T00:00:00",
"scale": "30d",
"offset": "1h",
"decay": 0.8
}
}
}
}
}
I'm trying to convert the above but so far unsuccessful.
Metadata
Metadata
Assignees
Labels
No labels