code: public function removeKeywords(array $keywordIds)
      {
          array_walk($keywordIds, function(&$keywordId) {$keywordId = new \MongoId($keywordId);});
  
          $qb = $this->createQueryBuilder();
          $qb->remove()
              ->field('id')->in($keywordIds)
              ->getQuery()
              ->execute();
      }
docs: @param array $keywordIds
  
  @throws \Doctrine\ODM\MongoDB\MongoDBException