classes/ezsolrbase.php
function deleteDocs ( $docIDs = array(), $query = false, $commit = true,  $optimize = false, $commitWithin = 0 )
    {
        $postString = '<delete>';

        if ( is_numeric( $commitWithin ) && $commitWithin > 0 )
        {
            $postString = '<delete commitWithin="' . $commitWithin . '">';
        }

        if ( empty( $query ) )
        {
            foreach ( $docIDs as $docID )
            {
                $postString .= '<id>' . $docID . '</id>';
            }
        }
        else
        {
            $postString .= '<query>' . $query . '</query>';
        }
        $postString .= '</delete>';
        $updateXML = $this->postQuery ( '/update', $postString, 'text/xml' );
        if ( $optimize )
        {
            $this->optimize( $commit );
        }
        elseif ( $commit )
        {
            $this->commit();
        }

        return self::validateUpdateResult( $updateXML );
    }
function deleteDocs ( $docIDs = array(), $query = false, $commit = true,  $optimize = false, $commitWithin = 0 )
    {
        $postString = '<delete>';

        if ( is_numeric( $commitWithin ) && $commitWithin > 0 )
        {
            $postString = '<delete commitWithin="' . $commitWithin . '">';
        }

        if ( empty( $query ) )
        {
            foreach ( $docIDs as $docID )
            {
                $postString .= '<id>' . $docID . '</id>';
            }
        }
        else
        {
            $postString .= '<query>' . $query . '</query>';
        }
        $postString .= '</delete>';
        $updateXML = $this->postQuery ( '/update', $postString, 'text/xml' );
        if ( $optimize )
        {
            $this->optimize( $commit );
        }
        elseif ( $commit )
        {
            $this->commit();
        }

        return self::validateUpdateResult( $updateXML );
    }
function deleteDocs ( $ docIDs = array ( ) , $ query = false , $ commit = true , $ optimize = false , $ commitWithin = 0 ) { $ postString = '<delete>' ; if ( is_numeric ( $ commitWithin ) && $ commitWithin > 0 ) { $ postString = '<delete commitWithin="' . $ commitWithin . '">' ; } if ( empty ( $ query ) ) { foreach ( $ docIDs as $ docID ) { $ postString .= '<id>' . $ docID . '</id>' ; } } else { $ postString .= '<query>' . $ query . '</query>' ; } $ postString .= '</delete>' ; $ updateXML = $ this -> postQuery ( '/update' , $ postString , 'text/xml' ) ; if ( $ optimize ) { $ this -> optimize ( $ commit ) ; } elseif ( $ commit ) { $ this -> commit ( ) ; } return self :: validateUpdateResult ( $ updateXML ) ; }
Removes an array of docID's from the Solr index

@param array $docsID List of document IDs to delete. If set to <empty>,
$query will be used to delete documents instead.
@param string $query Solr Query. This will be ignored if $docIDs is set.
@param bool $optimize set to true to perform a solr optimize after delete
@param integer $commitWithin specifies within how many milliseconds a commit should occur if no other commit
@return bool
Removes an array of docID s from the Solr index