Author: humbedooh
Date: Sun Mar 29 10:16:02 2015
New Revision: 1669886
URL: http://svn.apache.org/r1669886
Log:
use exists() instead of get() when only checking if a doc exists.
Modified:
steve/trunk/pysteve/lib/election.py
Modified: steve/trunk/pysteve/lib/election.py
URL:
http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/election.py?rev=1669886&r1=1669885&r2=1669886&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/election.py (original)
+++ steve/trunk/pysteve/lib/election.py Sun Mar 29 10:16:02 2015
@@ -65,7 +65,7 @@ def exists(election, *issue):
doc = "issues"
eid = hashlib.sha224(election + "/" + issue[0]).hexdigest()
try:
- res = es.get(index="steve", doc_type=doc, id=eid)
+ res = es.exists(index="steve", doc_type=doc, id=eid)
if res:
return True
else: