Repository: elastic/elasticsearch-dsl-py

Issue:
script_score not working
Using `script_score` throws `ValueError(Q() can only accept dict with a single query...`

```json
{
  "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.

Discussion:

Patch:
diff --git a/elasticsearch_dsl/query.py b/elasticsearch_dsl/query.py
index cedd0a7..642ce2c 100644
--- a/elasticsearch_dsl/query.py
+++ b/elasticsearch_dsl/query.py
@@ -499,6 +499,11 @@ class Script(Query):
     name = "script"
 
 
+class ScriptScore(Query):
+    name = "script_score"
+    _param_defs = {"query": {"type": "query"}}
+
+
 class Type(Query):
     name = "type"
 


Test patch:
diff --git a/tests/test_query.py b/tests/test_query.py
index 2e58040..2c9823e 100644
--- a/tests/test_query.py
+++ b/tests/test_query.py
@@ -538,3 +538,18 @@ def test_function_score_from_dict():
     assert isinstance(sf, function.BoostFactor)
     assert 6 == sf.value
     assert {"boost_factor": 6} == sf.to_dict()
+
+
+def test_script_score():
+    d = {
+        "script_score": {
+            "query": {"match_all": {}},
+            "script": {"source": "...", "params": {}},
+        }
+    }
+    q = query.Q(d)
+
+    assert isinstance(q, query.ScriptScore)
+    assert isinstance(q.query, query.MatchAll)
+    assert q.script == {"source": "...", "params": {}}
+    assert q.to_dict() == d