# HG changeset patch
# User Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
# Date 1539080286 -7200
#      Tue Oct 09 12:18:06 2018 +0200
# Node ID 0d670a8ad890cadaa5a9e04b07c74f13ccba8733
# Parent  c971479078cbcbc5347fea869f15a524aa796701
[es6] depend on elasticsearch / elasticsearch_dsl v6

Starting from ES6, `_type` metadata is deprecated,
cf. https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

diff --git a/cubicweb_elasticsearch/__pkginfo__.py b/cubicweb_elasticsearch/__pkginfo__.py
--- a/cubicweb_elasticsearch/__pkginfo__.py
+++ b/cubicweb_elasticsearch/__pkginfo__.py
@@ -15,8 +15,8 @@
 
 __depends__ = {'cubicweb': '>= 3.24.0', 'six': '>= 1.4.0',
                'cwtags': None,
-               'elasticsearch': '>=2.0.0,<3.0.0',
-               'elasticsearch-dsl': '<5.0.0',
+               'elasticsearch': '>=6.0.0',
+               'elasticsearch-dsl': '>=6.0.0',
                'beautifulsoup4': None,
                }
 
diff --git a/cubicweb_elasticsearch/ccplugin.py b/cubicweb_elasticsearch/ccplugin.py
--- a/cubicweb_elasticsearch/ccplugin.py
+++ b/cubicweb_elasticsearch/ccplugin.py
@@ -115,7 +115,6 @@
                     # "doc_type" in kwargs bellow must be container data.
                     data = {'_op_type': 'index',
                             '_index': index_name or cnx.vreg.config['index-name'],
-                            '_type': json['cw_etype'],
                             '_id': serializer.es_id,
                             '_source': json
                             }