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 );
    }