search/plugins/ezsolr/ezsolr.php
function addFieldBaseToDoc( ezfSolrDocumentFieldBase $fieldBase, eZSolrDoc $doc, $boost = false )
    {
        $fieldBaseData = $fieldBase->getData();
        if ( empty( $fieldBaseData ) )
        {
            if ( is_object( $fieldBase ) )
            {
                $contentClassAttribute = $fieldBase->ContentObjectAttribute->attribute( 'contentclass_attribute' );
                $fieldName = $fieldBase->getFieldName( $contentClassAttribute );
                $errorMessage = 'empty array for ' . $fieldName;
            }
            else
            {
                $errorMessage = '$fieldBase not an object';
            }
            eZDebug::writeNotice( $errorMessage , __METHOD__ );
            return false;
        }
        else
        {
           foreach ( $fieldBaseData as $key => $value )
           {
               // since ezfind 2.3, a NULL value returned from $fieldBase in the $value elements is used as a flag not to index
               if ( !is_null( $value ) )
               {
                   $doc->addField( $key, $value, $boost );
               }
           }
           return true;
        }

    }
function addFieldBaseToDoc( ezfSolrDocumentFieldBase $fieldBase, eZSolrDoc $doc, $boost = false )
    {
        $fieldBaseData = $fieldBase->getData();
        if ( empty( $fieldBaseData ) )
        {
            if ( is_object( $fieldBase ) )
            {
                $contentClassAttribute = $fieldBase->ContentObjectAttribute->attribute( 'contentclass_attribute' );
                $fieldName = $fieldBase->getFieldName( $contentClassAttribute );
                $errorMessage = 'empty array for ' . $fieldName;
            }
            else
            {
                $errorMessage = '$fieldBase not an object';
            }
            eZDebug::writeNotice( $errorMessage , __METHOD__ );
            return false;
        }
        else
        {
           foreach ( $fieldBaseData as $key => $value )
           {
               // since ezfind 2.3, a NULL value returned from $fieldBase in the $value elements is used as a flag not to index
               if ( !is_null( $value ) )
               {
                   $doc->addField( $key, $value, $boost );
               }
           }
           return true;
        }

    }
function addFieldBaseToDoc ( ezfSolrDocumentFieldBase $ fieldBase , eZSolrDoc $ doc , $ boost = false ) { $ fieldBaseData = $ fieldBase -> getData ( ) ; if ( empty ( $ fieldBaseData ) ) { if ( is_object ( $ fieldBase ) ) { $ contentClassAttribute = $ fieldBase -> ContentObjectAttribute -> attribute ( 'contentclass_attribute' ) ; $ fieldName = $ fieldBase -> getFieldName ( $ contentClassAttribute ) ; $ errorMessage = 'empty array for ' . $ fieldName ; } else { $ errorMessage = '$fieldBase not an object' ; } eZDebug :: writeNotice ( $ errorMessage , __METHOD__ ) ; return false ; } else { foreach ( $ fieldBaseData as $ key => $ value ) { // since ezfind 2.3, a NULL value returned from $fieldBase in the $value elements is used as a flag not to index if ( ! is_null ( $ value ) ) { $ doc -> addField ( $ key , $ value , $ boost ) ; } } return true ; } }
Add instance of ezfSolrDocumentFieldBase to Solr document.

@param ezfSolrDocumentFieldBase Instance of ezfSolrDocumentFieldBase
@param eZSolrDoc Solr document
Add instance of ezfSolrDocumentFieldBase to Solr document .