Modify jsonify.py to work with elasticsearch