Skip to content
Snippets Groups Projects
Commit cf0931e576e2 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[views] debug-es also displays elastic search response

parent f859339123c8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment