def search(self, index_name, query):

        try:
            results = self.els_search.search(index=index_name, body=query)
            return results
        except Exception, error:
            error_str = 'Query failed: %s\n' % str(error)
            error_str += '\nIs there a dynamic script in the query?, see www.elasticsearch.org'
            print error_str
            raise RuntimeError(error_str)
Interaction function, emulates a very dumb telnet client.
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/server/els_indexer.py/ELSIndexer.search--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/telnetlib.py/Telnet.interact