'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.'

def __init__(self, connection, search, indices=None, doc_types=None, query_params=None, headers=None, auto_fix_keys=False, auto_clean_highlight=False, model=None):

    from .query import Search
    if (not isinstance(search, Search)):
        raise InvalidQuery('ResultSet    must    be    supplied    with    a    Search    object')
    self.search = search
    self.connection = connection
    self.indices = indices
    self.doc_types = doc_types
    self.query_params = (query_params or {})
    self.headers = headers
    self.scroller_parameters = {}
    self.scroller_id = None
    self._results = None
    self.model = (model or self.connection.model)
    self._total = None
    self._max_score = None
    self.valid = False
    self._facets = {}
    self._aggs = {}
    self._hits = []
    self.auto_fix_keys = auto_fix_keys
    self.auto_clean_highlight = auto_clean_highlight
    self.iterpos = 0
    self.start = (query_params.get('start', search.start) or 0)
    self._max_item = query_params.get('size', search.size)
    self._current_item = 0
    if (search.bulk_read is not None):
        self.chuck_size = search.bulk_read
    elif (search.size is not None):
        self.chuck_size = search.size
    else:
        self.chuck_size = 10
