private function _mergeNorms()
    {
        foreach ($this->_writer->getFieldInfos() as $fieldInfo) {
            if ($fieldInfo->isIndexed) {
                foreach ($this->_segmentInfos as $segName => $segmentInfo) {
                    if ($segmentInfo->hasDeletions()) {
                        $srcNorm = $segmentInfo->normVector($fieldInfo->name);
                        $norm    = '';
                        $docs    = $segmentInfo->count();
                        for ($count = 0; $count < $docs; $count++) {
                            if (!$segmentInfo->isDeleted($count)) {
                                $norm .= $srcNorm[$count];
                            }
                        }
                        $this->_writer->addNorm($fieldInfo->name, $norm);
                    } else {
                        $this->_writer->addNorm($fieldInfo->name, $segmentInfo->normVector($fieldInfo->name));
                    }
                }
            }
        }
    }
private function _mergeNorms()
    {
        foreach ($this->_writer->getFieldInfos() as $fieldInfo) {
            if ($fieldInfo->isIndexed) {
                foreach ($this->_segmentInfos as $segName => $segmentInfo) {
                    if ($segmentInfo->hasDeletions()) {
                        $srcNorm = $segmentInfo->normVector($fieldInfo->name);
                        $norm    = '';
                        $docs    = $segmentInfo->count();
                        for ($count = 0; $count < $docs; $count++) {
                            if (!$segmentInfo->isDeleted($count)) {
                                $norm .= $srcNorm[$count];
                            }
                        }
                        $this->_writer->addNorm($fieldInfo->name, $norm);
                    } else {
                        $this->_writer->addNorm($fieldInfo->name, $segmentInfo->normVector($fieldInfo->name));
                    }
                }
            }
        }
    }
private function _mergeNorms ( ) { foreach ( $ this -> _writer -> getFieldInfos ( ) as $ fieldInfo ) { if ( $ fieldInfo -> isIndexed ) { foreach ( $ this -> _segmentInfos as $ segName => $ segmentInfo ) { if ( $ segmentInfo -> hasDeletions ( ) ) { $ srcNorm = $ segmentInfo -> normVector ( $ fieldInfo -> name ) ; $ norm = '' ; $ docs = $ segmentInfo -> count ( ) ; for ( $ count = 0 ; $ count < $ docs ; $ count ++ ) { if ( ! $ segmentInfo -> isDeleted ( $ count ) ) { $ norm .= $ srcNorm [ $ count ] ; } } $ this -> _writer -> addNorm ( $ fieldInfo -> name , $ norm ) ; } else { $ this -> _writer -> addNorm ( $ fieldInfo -> name , $ segmentInfo -> normVector ( $ fieldInfo -> name ) ) ; } } } } }
Merge field's normalization factors
Merge field s normalization factors