Repository: elastic/elasticsearch-dsl-py

Issue:
Support for constant_keyword
When trying to add a field of type [constant_keyword](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/constant-keyword.html) to a Mapping, an exception is returned:

```
DSL class `constant_keyword` does not exist in field.
```

Discussion:

Patch:
diff --git a/elasticsearch_dsl/field.py b/elasticsearch_dsl/field.py
index 6a1ed99..6e79b40 100644
--- a/elasticsearch_dsl/field.py
+++ b/elasticsearch_dsl/field.py
@@ -316,6 +316,10 @@ class Keyword(Field):
     name = "keyword"
 
 
+class ConstantKeyword(Keyword):
+    name = "constant_keyword"
+
+
 class Boolean(Field):
     name = "boolean"
     _coerce = True


Test patch:
diff --git a/tests/test_field.py b/tests/test_field.py
index 9c0c402..2e8ec96 100644
--- a/tests/test_field.py
+++ b/tests/test_field.py
@@ -172,6 +172,11 @@ def test_binary():
     assert f.deserialize(None) is None
 
 
+def test_constant_keyword():
+    f = field.ConstantKeyword()
+    assert f.to_dict() == {"type": "constant_keyword"}
+
+
 def test_object_dynamic_values():
     for dynamic in True, False, "strict":
         f = field.Object(dynamic=dynamic)