Repository: toluaina/pgsync (language: python)

Issue:
Added search_as_you_type value in ELASTICSEARCH_TYPES
Please merge this as search_as_you_type is supported in elasticsearch field types. https://www.elastic.co/guide/en/elasticsearch/reference/current/search-as-you-type.html


Discussion / hints:
Hi, Should we add additional types here? I do have the same case for range types. 
I need to be able to add an integer_range type 
> Hi, Should we add additional types here? I do have the same case for range types. I need to be able to add an integer_range type

Feel free to add as needed

Fix patch:
diff --git a/pgsync/constants.py b/pgsync/constants.py
index 8cbf1447..547001c4 100644
--- a/pgsync/constants.py
+++ b/pgsync/constants.py
@@ -106,6 +106,11 @@
     "short",
     "text",
     "time",
+    "integer_range",
+    "float_range",
+    "long_range",
+    "double_range",
+    "date_range",
 ]
 
 # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-params.html


Test patch:
diff --git a/tests/test_constants.py b/tests/test_constants.py
index 583c6521..934db8f8 100644
--- a/tests/test_constants.py
+++ b/tests/test_constants.py
@@ -121,11 +121,17 @@ def test_elasticsearch_types(self):
             "nested",
             "null",
             "object",
+            "search_as_you_type",
             "scaled_float",
             "shape",
             "short",
             "text",
             "time",
+            "integer_range",
+            "float_range",
+            "long_range",
+            "double_range",
+            "date_range",
         ]
 
     def test_elasticsearch_mapping_parameters(self):