original_string: public function cleanup()
      {
          // Indexing is not implemented in eZ Publish 5 legacy search engine
          if ( $this->searchHandler instanceof LegacyHandler )
          {
              $db = eZDB::instance();
              $db->begin();
              $db->query( "DELETE FROM ezsearch_word" );
              $db->query( "DELETE FROM ezsearch_object_word_link" );
              $db->commit();
          }
          else if ( method_exists( $this->searchHandler, 'purgeIndex' ) )
          {
              $this->searchHandler->purgeIndex();
          }
      }
code: public function cleanup()
      {
          // Indexing is not implemented in eZ Publish 5 legacy search engine
          if ( $this->searchHandler instanceof LegacyHandler )
          {
              $db = eZDB::instance();
              $db->begin();
              $db->query( "DELETE FROM ezsearch_word" );
              $db->query( "DELETE FROM ezsearch_object_word_link" );
              $db->commit();
          }
          else if ( method_exists( $this->searchHandler, 'purgeIndex' ) )
          {
              $this->searchHandler->purgeIndex();
          }
      }
code_tokens: public function cleanup ( ) { // Indexing is not implemented in eZ Publish 5 legacy search engine if ( $ this -> searchHandler instanceof LegacyHandler ) { $ db = eZDB :: instance ( ) ; $ db -> begin ( ) ; $ db -> query ( "DELETE FROM ezsearch_word" ) ; $ db -> query ( "DELETE FROM ezsearch_object_word_link" ) ; $ db -> commit ( ) ; } else if ( method_exists ( $ this -> searchHandler , 'purgeIndex' ) ) { $ this -> searchHandler -> purgeIndex ( ) ; } }
docstring: Purges the index.
docstring_tokens: Purges the index .