code: def remove_commits(self, items, index, attribute, origin):
          
          es_query = '''
              {
                "query": {
                  "bool": {
                      "must": {
                          "term": {
                              "origin": "%s"
                          }
                      },
                      "filter": {
                          "terms": {
                              "%s": [%s]
                          }
                      }
                  }
                }
              }
              ''' % (origin, attribute, ",".join(['"%s"' % i for i in items]))
  
          r = self.requests.post(index + "/_delete_by_query?refresh", data=es_query, headers=HEADER_JSON, verify=False)
          try:
              r.raise_for_status()
          except requests.exceptions.HTTPError as ex:
              logger.error("Error updating deleted commits for %s.", self.elastic.anonymize_url(index))
              logger.error(r.text)
              return
docs: Delete documents that correspond to commits deleted in the Git repository
  
          :param items: target items to be deleted
          :param index: target index
          :param attribute: name of the term attribute to search items
          :param origin: name of the origin from where the items must be deleted