diff --git a/views.py b/views.py
index f859339123c83b5b28da1aa39590d13aa69bd68e_dmlld3MucHk=..cf0931e576e2d4868efb1e72294b683d06bb4718_dmlld3MucHk= 100644
--- a/views.py
+++ b/views.py
@@ -120,7 +120,14 @@
             self.w(u'</pre>')
             self.w(u'<br/>')
         try:
-            return search.execute()
+            response = search.execute()
+            if 'debug-es' in self._cw.form:
+                import json
+                self.w(u'<pre>')
+                self.w(unicode(json.dumps(response.to_dict(), indent=2)))
+                self.w(u'</pre>')
+                self.w(u'<br/>')
+            return response
         except NotFoundError:
             self.w(u'index not found in elasticsearch')
             return