code: def _items_to_es(self, json_items):
          
  
          if len(json_items) == 0:
              return
  
          logger.info("Adding items to Ocean for %s (%i items)" %
                      (self, len(json_items)))
  
          field_id = self.get_field_unique_id()
  
          inserted = self.elastic.bulk_upload(json_items, field_id)
  
          if len(json_items) != inserted:
              missing = len(json_items) - inserted
              info = json_items[0]
  
              name = info['backend_name']
              version = info['backend_version']
              origin = info['origin']
  
              logger.warning("%s/%s missing JSON items for backend %s [ver. %s], origin %s",
                             str(missing),
                             str(len(json_items)),
                             name, version, origin)
  
          return inserted
docs: Append items JSON to ES (data source state)