class_docstr: The ElasticSearchResponse class is used to manage and access the response from an Elasticsearch search.
  
  This class can be iterated over directly to access hits in the response. Indexing the class instance
  with an integer or slice will also access the hits. The class also evaluates to True
  if there are any hits in the response.
  
  The hits property returns an AttributeList of hits in the response, with each hit transformed into
  an instance of the doc_class if provided.
  
  The response parameter stores the dictionary returned by the Elasticsearch client search method.
class_docstr_tok: ["The","ElasticSearchResponse","class","is","used","to","manage","and","access","the","response","from","an","Elasticsearch","search",".","This","class","can","be","iterated","over","directly","to","access","hits","in","the","response",".","Indexing","the","class","instance","with","an","integer","or","slice","will","also","access","the","hits",".","The","class","also","evaluates","to","True","if","there","are","any","hits","in","the","response",".","The","hits","property","returns","an","AttributeList","of","hits","in","the","response",",","with","each","hit","transformed","into","an","instance","of","the","doc_class","if","provided",".","The","response","parameter","stores","the","dictionary","returned","by","the","Elasticsearch","client","search","method","."]
docstr: This property provides access to the hits (i.e., the results) of the Elasticsearch response.
  
  The hits are represented as an `AttributeList` of `Hit` instances, which allow for easy,
  attribute-like access to the hit data.
  
  The hits are lazily loaded, meaning they're not processed until this property is accessed.
  Upon first access, the hits data from the response is processed using the `_get_result` method
  of the associated `Search` instance (i.e. an instance from ElasticsearchTaskHandler class),
  and the results are stored for future accesses.
  
  Each hit also includes all the additional data present in the "hits" field of the response,
  accessible as attributes of the hit.
docstr_tok: ["This","property","provides","access","to","the","hits","(","i.e.",",","the","results",")","of","the","Elasticsearch","response",".","The","hits","are","represented","as","an","`","AttributeList","`","of","`","Hit","`","instances",",","which","allow","for","easy",",","attribute-like","access","to","the","hit","data",".","The","hits","are","lazily","loaded",",","meaning","they","'re","not","processed","until","this","property","is","accessed",".","Upon","first","access",",","the","hits","data","from","the","response","is","processed","using","the","`","_get_result","`","method","of","the","associated","`","Search","`","instance","(","i.e",".","an","instance","from","ElasticsearchTaskHandler","class",")",",","and","the","results","are","stored","for","future","accesses",".","Each","hit","also","includes","all","the","additional","data","present","in","the","``","hits","''","field","of","the","response",",","accessible","as","attributes","of","the","hit","."]
code: def hits(self) -> list[Hit]:
      """
      This property provides access to the hits (i.e., the results) of the Elasticsearch response.
  
      The hits are represented as an `AttributeList` of `Hit` instances, which allow for easy,
      attribute-like access to the hit data.
  
      The hits are lazily loaded, meaning they're not processed until this property is accessed.
      Upon first access, the hits data from the response is processed using the `_get_result` method
      of the associated `Search` instance (i.e. an instance from ElasticsearchTaskHandler class),
      and the results are stored for future accesses.
  
      Each hit also includes all the additional data present in the "hits" field of the response,
      accessible as attributes of the hit.
      """
      if not hasattr(self, "_hits"):
          h = self._d_["hits"]
  
          try:
              hits = AttributeList(
                  map(self._search._get_result, h["hits"])
              )
          except AttributeError as e:
              raise TypeError("Could not parse hits.", e)
  
          super().__setattr__("_hits", hits)
          for k in h:
              setattr(self._hits, k, _wrap(h[k]))
      return self._hits
  
imports: from __future__ import annotations
  from typing import Iterator
label_desc: Use image node_id 5 for calling the ElasticSearchResponse obj's underlying member method code with example usage: obj.hits() and returns: self