From 9e830710d1a8ecc7f80b5ac7aea766554bb3611d Mon Sep 17 00:00:00 2001 From: Sam Ware Date: Fri, 16 Oct 2020 17:08:57 -0500 Subject: [PATCH] Remove the declaring the type as it is deprecated This is resolve #76 (Specifying types in bulk requests is deprecated) which results in the following warning. ElasticsearchDeprecationWarning: [types removal] Specifying types in bulk requests is deprecated. --- cmreslogging/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmreslogging/handlers.py b/cmreslogging/handlers.py index 52e250a..fab6826 100644 --- a/cmreslogging/handlers.py +++ b/cmreslogging/handlers.py @@ -292,7 +292,7 @@ def flush(self): actions = ( { '_index': self._index_name_func.__func__(self.es_index_name), - '_type': self.es_doc_type, + # '_type': self.es_doc_type, #Remove to resolve Issue #76 (ElasticsearchDeprecationWarning: [types removal] Specifying types in bulk requests is deprecated.) '_source': log_record } for log_record in logs_buffer