def __init__(self, connection, searches, indices_list=None,<EOL>doc_types_list=None, routing_list=None, search_type_list=None, models=None):
for search in searches:<EOL><INDENT>if not isinstance(search, Search):<EOL><INDENT>raise InvalidQuery("<STR_LIT>")<EOL><DEDENT><DEDENT>self.searches = searches<EOL>num_searches = len(self.searches)<EOL>self.connection = connection<EOL>if indices_list is None:<EOL><INDENT>self.indices_list = [None] * num_searches<EOL><DEDENT>else:<EOL><INDENT>self.indices_list = indices_list<EOL><DEDENT>if doc_types_list is None:<EOL><INDENT>self.doc_types_list = [None] * num_searches<EOL><DEDENT>else:<EOL><INDENT>self.doc_types_list = doc_types_list<EOL><DEDENT>if routing_list is None:<EOL><INDENT>self.routing_list = [None] * num_searches<EOL><DEDENT>else:<EOL><INDENT>self.routing_list = routing_list<EOL><DEDENT>if search_type_list is None:<EOL><INDENT>self.search_type_list = [None] * num_searches<EOL><DEDENT>else:<EOL><INDENT>self.search_type_list = search_type_list<EOL><DEDENT>self._results_list = None<EOL>self.models = models or self.connection.model<EOL>self._total = None<EOL>self.valid = False<EOL>self.error = None<EOL>self.multi_search_query = None<EOL>self.iterpos = <NUM_LIT:0><EOL>self._max_item = None<EOL>
results: an es query results dict
fix_keys: remove the "_" from every key, useful for django views
clean_highlight: removed empty highlight
search: a Search object.