def _get_conn(*args, **kwargs): _conn = ES(settings.es_hosts, *args, **kwargs) _conn.default_indices = settings.es_index return _conn