v1.53.10 : modify for elasticsearch >1.0 V01.53.10
authorcavaliet
Thu, 18 Sep 2014 15:35:33 +0200
changeset 1320 88ce48689c14
parent 1319 160add2c52a1
child 1321 fd70d49eab27
v1.53.10 : modify for elasticsearch >1.0
src/ldt/ldt/__init__.py
src/ldt/ldt/indexation/backends/elasticsearch_backend.py
--- a/src/ldt/ldt/__init__.py	Wed Jul 23 17:50:27 2014 +0200
+++ b/src/ldt/ldt/__init__.py	Thu Sep 18 15:35:33 2014 +0200
@@ -1,6 +1,6 @@
 __all__ = ["VERSION", "get_version", "__version__"]
 
-VERSION = (1, 53, 9, "final", 0)
+VERSION = (1, 53, 10, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/indexation/backends/elasticsearch_backend.py	Wed Jul 23 17:50:27 2014 +0200
+++ b/src/ldt/ldt/indexation/backends/elasticsearch_backend.py	Thu Sep 18 15:35:33 2014 +0200
@@ -74,7 +74,7 @@
             ids = [get_identifier(elt) for elt in obj_or_string]
             if not ids:
                 return
-            q = {'ids' : {'values' : ids}}
+            q = {"query": {'ids' : {'values' : ids}}}
             self.conn.delete_by_query(self.index_name, 'modelresult', q)
         else: 
             return super(ElasticsearchSearchBackend, self).remove(obj_or_string, commit=commit)