code: def _build_search_query(self, from_date):
          
  
          sort = [{self._sort_on_field: {"order": "asc"}}]
  
          filters = []
          if self._repo:
              filters.append({"term": {"origin": self._repo}})
  
          if from_date:
              filters.append({"range": {self._sort_on_field: {"gte": from_date}}})
  
          if filters:
              query = {"bool": {"filter": filters}}
          else:
              query = {"match_all": {}}
  
          search_query = {
              "query": query,
              "sort": sort
          }
  
          return search_query
docs: Build an ElasticSearch search query to retrieve items for read methods.
  
          :param from_date: date to start retrieving items from.
          :return: JSON query in dict format