original_string: public function removeObjectById( $contentObjectId, $commit = null )
      {
          if ( !isset( $commit ) && ( $this->iniConfig->variable( 'IndexOptions', 'DisableDeleteCommits' ) === 'true' ) )
          {
              $commit = false;
          }
          elseif ( !isset( $commit ) )
          {
              $commit = true;
          }
  
          // Indexing is not implemented in eZ Publish 5 legacy search engine
          if ( $this->searchHandler instanceof LegacyHandler )
          {
              $searchEngine = new eZSearchEngine();
              $searchEngine->removeObjectById( $contentObjectId, $commit );
  
              return true;
          }
  
          $this->searchHandler->deleteContent( (int)$contentObjectId );
  
          if ( $commit )
          {
              $this->commit();
          }
  
          return true;
      }
code: public function removeObjectById( $contentObjectId, $commit = null )
      {
          if ( !isset( $commit ) && ( $this->iniConfig->variable( 'IndexOptions', 'DisableDeleteCommits' ) === 'true' ) )
          {
              $commit = false;
          }
          elseif ( !isset( $commit ) )
          {
              $commit = true;
          }
  
          // Indexing is not implemented in eZ Publish 5 legacy search engine
          if ( $this->searchHandler instanceof LegacyHandler )
          {
              $searchEngine = new eZSearchEngine();
              $searchEngine->removeObjectById( $contentObjectId, $commit );
  
              return true;
          }
  
          $this->searchHandler->deleteContent( (int)$contentObjectId );
  
          if ( $commit )
          {
              $this->commit();
          }
  
          return true;
      }
code_tokens: public function removeObjectById ( $ contentObjectId , $ commit = null ) { if ( ! isset ( $ commit ) && ( $ this -> iniConfig -> variable ( 'IndexOptions' , 'DisableDeleteCommits' ) === 'true' ) ) { $ commit = false ; } elseif ( ! isset ( $ commit ) ) { $ commit = true ; } // Indexing is not implemented in eZ Publish 5 legacy search engine if ( $ this -> searchHandler instanceof LegacyHandler ) { $ searchEngine = new eZSearchEngine ( ) ; $ searchEngine -> removeObjectById ( $ contentObjectId , $ commit ) ; return true ; } $ this -> searchHandler -> deleteContent ( ( int ) $ contentObjectId ) ; if ( $ commit ) { $ this -> commit ( ) ; } return true ; }
docstring: Removes a content object by ID from the search database.
  
  @since 5.0
  
  @param int $contentObjectId The content object to remove by ID
  @param bool $commit Whether to commit after removing the object
  
  @return bool True if the operation succeeded
docstring_tokens: Removes a content object by ID from the search database .