original_string: 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));
                      }
                  }
              }
          }
      }
code: 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));
                      }
                  }
              }
          }
      }
code_tokens: 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 ) ) ; } } } } }
docstring: Merge field's normalization factors
docstring_tokens: Merge field s normalization factors