code: def _es_search(
      self,
      index: str,
      es_query: Dict[str, Any],
      size: int,
      routing: Optional[str] = None,
  ):
      knn = es_query.pop("knn", None)
      if knn:
          results = self.__client__.search(
              index=index,
              knn=knn,
              query=es_query.get("query"),
              aggs=es_query.get("aggs"),
              routing=routing,
              track_total_hits=True,
              rest_total_hits_as_int=True,
              size=size,
              source=es_query.get("_source"),
          )
      else:
          results = self.__client__.search(
              index=index,
              routing=routing,
              body=es_query,
              track_total_hits=True,
              rest_total_hits_as_int=True,
              size=size,
          )
      return results
  
file_path: argilla/src/argilla/server/daos/backend/client_adapters/elasticsearch.py
imports: import dataclasses
  from typing import Any, Dict, Iterable, Optional, Tuple
  import elasticsearch8
  from argilla.server.daos.backend.base import BackendErrorHandler
  from argilla.server.daos.backend.client_adapters.opensearch import OpenSearchClient
  from argilla.server.daos.backend.search.query_builder import EsQueryBuilder
  from elasticsearch8 import ApiError, Elasticsearch, ElasticsearchWarning, NotFoundError, RequestError, helpers
  from elasticsearch8.helpers import BulkIndexError
label_desc: Use image node_id 5 for calling the ElasticsearchClient obj's underlying member method code with example usage: obj._es_search(index, es_query, size, routing) and returns: results