classes/ezsolrbase.php
static function validateUpdateResult ( $updateResult )
    {
        if ( empty( $updateResult ) )
        {
            eZDebug::writeError( 'Empty response received from Solr', 'eZ Find' );
            return false;
        }
        $dom = new DOMDocument( '1.0' );
        // Supresses error messages
        $status = $dom->loadXML( $updateResult, LIBXML_NOWARNING | LIBXML_NOERROR  );

        if ( !$status )
        {
            eZDebug::writeError( 'Invalid XML received from Solr: '.$updateResult, 'eZ Find' );
            return false;
        }

        $intElements = $dom->getElementsByTagName( 'int' );

        if ( $intElements->length < 1 )
        {
            eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
            return false;
        }

        foreach ( $intElements as $intNode )
        {
            foreach ( $intNode->attributes as $attribute )
            {
                if ( ( $attribute->name === 'name' ) and ( $attribute->value === 'status' ) )
                {
                    //Then we have found the correct node
                    return ( $intNode->nodeValue === "0"  );
                }
            }
        }
        eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
        return false;
    }
static function validateUpdateResult ( $updateResult )
    {
        if ( empty( $updateResult ) )
        {
            eZDebug::writeError( 'Empty response received from Solr', 'eZ Find' );
            return false;
        }
        $dom = new DOMDocument( '1.0' );
        // Supresses error messages
        $status = $dom->loadXML( $updateResult, LIBXML_NOWARNING | LIBXML_NOERROR  );

        if ( !$status )
        {
            eZDebug::writeError( 'Invalid XML received from Solr: '.$updateResult, 'eZ Find' );
            return false;
        }

        $intElements = $dom->getElementsByTagName( 'int' );

        if ( $intElements->length < 1 )
        {
            eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
            return false;
        }

        foreach ( $intElements as $intNode )
        {
            foreach ( $intNode->attributes as $attribute )
            {
                if ( ( $attribute->name === 'name' ) and ( $attribute->value === 'status' ) )
                {
                    //Then we have found the correct node
                    return ( $intNode->nodeValue === "0"  );
                }
            }
        }
        eZDebug::writeError( 'Invalid response from Solr: '.$updateResult, 'eZ Find' );
        return false;
    }
static function validateUpdateResult ( $ updateResult ) { if ( empty ( $ updateResult ) ) { eZDebug :: writeError ( 'Empty response received from Solr' , 'eZ Find' ) ; return false ; } $ dom = new DOMDocument ( '1.0' ) ; // Supresses error messages $ status = $ dom -> loadXML ( $ updateResult , LIBXML_NOWARNING | LIBXML_NOERROR ) ; if ( ! $ status ) { eZDebug :: writeError ( 'Invalid XML received from Solr: ' . $ updateResult , 'eZ Find' ) ; return false ; } $ intElements = $ dom -> getElementsByTagName ( 'int' ) ; if ( $ intElements -> length < 1 ) { eZDebug :: writeError ( 'Invalid response from Solr: ' . $ updateResult , 'eZ Find' ) ; return false ; } foreach ( $ intElements as $ intNode ) { foreach ( $ intNode -> attributes as $ attribute ) { if ( ( $ attribute -> name === 'name' ) and ( $ attribute -> value === 'status' ) ) { //Then we have found the correct node return ( $ intNode -> nodeValue === "0" ) ; } } } eZDebug :: writeError ( 'Invalid response from Solr: ' . $ updateResult , 'eZ Find' ) ; return false ; }
Function to validate the update result returned by solr

A valid solr update reply contains the following document:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">3</int>
</lst>
<strname="WARNING">This response format is experimental.  It is likely to change in the future.</str>
</response>

Function will check if solrResult document contains "<int name="status">0</int>"
Function to validate the update result returned by solr