You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/03/27 19:11:53 UTC

svn commit: r1736782 - /steve/trunk/pysteve/lib/backends/es.py

Author: humbedooh
Date: Sun Mar 27 17:11:53 2016
New Revision: 1736782

URL: http://svn.apache.org/viewvc?rev=1736782&view=rev
Log:
more specific ES match

Modified:
    steve/trunk/pysteve/lib/backends/es.py

Modified: steve/trunk/pysteve/lib/backends/es.py
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/backends/es.py?rev=1736782&r1=1736781&r2=1736782&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/backends/es.py (original)
+++ steve/trunk/pysteve/lib/backends/es.py Sun Mar 27 17:11:53 2016
@@ -261,7 +261,11 @@ class ElasticSearchBackend:
                 
         # Then, get all ballots and note whether they still apply or not
         ballots = {}
-        res = self.es.search(index="steve", doc_type="voters", q = "uid:\"%s\"" % UID, size = 999)
+        res = self.es.search(index="steve", doc_type="voters", body = {
+            "match": {
+                "uid": UID
+            }
+        }, size = 999)
         results = len(res['hits']['hits'])
         if results > 0:
             for entry in res['hits']['hits']: