original_string: public function truncateTable()
      {
          $connection = $this->_em->getConnection();
          $dbPlatform = $connection->getDatabasePlatform();
          $connection->beginTransaction();
          try {
              $q = $dbPlatform->getTruncateTableSql($this->getSearchIndexTable());
              $connection->executeUpdate($q);
              $connection->commit();
  
              return true;
          } catch (\Exception $e) {
              $connection->rollback();
  
              return false;
          }
      }
code: public function truncateTable()
      {
          $connection = $this->_em->getConnection();
          $dbPlatform = $connection->getDatabasePlatform();
          $connection->beginTransaction();
          try {
              $q = $dbPlatform->getTruncateTableSql($this->getSearchIndexTable());
              $connection->executeUpdate($q);
              $connection->commit();
  
              return true;
          } catch (\Exception $e) {
              $connection->rollback();
  
              return false;
          }
      }
code_tokens: public function truncateTable ( ) { $ connection = $ this -> _em -> getConnection ( ) ; $ dbPlatform = $ connection -> getDatabasePlatform ( ) ; $ connection -> beginTransaction ( ) ; try { $ q = $ dbPlatform -> getTruncateTableSql ( $ this -> getSearchIndexTable ( ) ) ; $ connection -> executeUpdate ( $ q ) ; $ connection -> commit ( ) ; return true ; } catch ( \ Exception $ e ) { $ connection -> rollback ( ) ; return false ; } }
docstring: Truncates the search index table.
  
  @return bool true if success
docstring_tokens: Truncates the search index table .