src/Search/Framework/Indexer.php
public function normalizeField(IndexField $field)
    {
        $id = $field->getId();
        $value = $field->getValue();

        $log = $this->getLogger();
        $context = array('field' => $id);

        if (isset($this->_fieldTypes[$id])) {
            if ($this->_searchEngine->hasNormalizer($this->_fieldTypes[$id])) {
                $normalizer = $this->_searchEngine->getNormalizer($this->_fieldTypes[$id]);
                $context['normalizer'] = get_class($normalizer);
                $value = $normalizer->normalize($value);
                $log->debug('Normalizer applied to field', $context);
            }
        } else {
            $log->debug('Data type could not be determined for field', $context);
        }

        return $value;
    }
public function normalizeField(IndexField $field)
    {
        $id = $field->getId();
        $value = $field->getValue();

        $log = $this->getLogger();
        $context = array('field' => $id);

        if (isset($this->_fieldTypes[$id])) {
            if ($this->_searchEngine->hasNormalizer($this->_fieldTypes[$id])) {
                $normalizer = $this->_searchEngine->getNormalizer($this->_fieldTypes[$id]);
                $context['normalizer'] = get_class($normalizer);
                $value = $normalizer->normalize($value);
                $log->debug('Normalizer applied to field', $context);
            }
        } else {
            $log->debug('Data type could not be determined for field', $context);
        }

        return $value;
    }
public function normalizeField ( IndexField $ field ) { $ id = $ field -> getId ( ) ; $ value = $ field -> getValue ( ) ; $ log = $ this -> getLogger ( ) ; $ context = array ( 'field' => $ id ) ; if ( isset ( $ this -> _fieldTypes [ $ id ] ) ) { if ( $ this -> _searchEngine -> hasNormalizer ( $ this -> _fieldTypes [ $ id ] ) ) { $ normalizer = $ this -> _searchEngine -> getNormalizer ( $ this -> _fieldTypes [ $ id ] ) ; $ context [ 'normalizer' ] = get_class ( $ normalizer ) ; $ value = $ normalizer -> normalize ( $ value ) ; $ log -> debug ( 'Normalizer applied to field' , $ context ) ; } } else { $ log -> debug ( 'Data type could not be determined for field' , $ context ) ; } return $ value ; }
Apply the serivce specific normalizers to a field's value.

@param IndexField $field
The field being normalized.

@return string|array
Apply the serivce specific normalizers to a field s value .