code: def fetch(elastic, backend, limit=None, search_after_value=None, scroll=True):
      
  
      logging.debug("Creating a elastic items generator.")
  
      elastic_scroll_id = None
      search_after = search_after_value
  
      while True:
          if scroll:
              rjson = get_elastic_items(elastic, elastic_scroll_id, limit)
          else:
              rjson = get_elastic_items_search(elastic, search_after, limit)
  
          if rjson and "_scroll_id" in rjson:
              elastic_scroll_id = rjson["_scroll_id"]
  
          if rjson and "hits" in rjson:
              if not rjson["hits"]["hits"]:
                  break
              for hit in rjson["hits"]["hits"]:
                  item = hit['_source']
                  if 'sort' in hit:
                      search_after = hit['sort']
                  try:
                      backend._fix_item(item)
                  except Exception:
                      pass
                  yield item
          else:
              logging.error("No results found from %s", elastic.index_url)
              break
  
      return
docs: Fetch the items from raw or enriched index