<commit_before>function(doc) {
  var urlParts = doc._id.split('/');

  var emit_meta = function(urlParts, template) {
    emit(urlParts.concat('', '', 'site'), {'_id':'site'});
    emit(urlParts.concat('', '', 'sitemap'), {'_id':'sitemap'});
    // always include the default template doc as a foundation
    emit(urlParts.concat('', '', 'template'), {'_id':'template~default'});
    if (template) {
      emit(urlParts.concat('', '', 'template_override'), {'_id': template});
    }
  };

  if (doc.type === 'redirect' && 'url' in doc) {
    emit(urlParts.concat('', '', 'redirect'), {'url': doc.url});
  } else if (doc.type === 'page' && 'redirect' in doc) {<commit_msg>Do not redirect empty redirect fields<commit_after>function(doc) {
  var urlParts = doc._id.split('/');

  var emit_meta = function(urlParts, template) {
    emit(urlParts.concat('', '', 'site'), {'_id':'site'});
    emit(urlParts.concat('', '', 'sitemap'), {'_id':'sitemap'});
    // always include the default template doc as a foundation
    emit(urlParts.concat('', '', 'template'), {'_id':'template~default'});
    if (template) {
      emit(urlParts.concat('', '', 'template_override'), {'_id': template});
    }
  };

  if (doc.type === 'redirect' && 'url' in doc) {
    emit(urlParts.concat('', '', 'redirect'), {'url': doc.url});
  } else if (doc.type === 'page' && 'redirect' in doc && doc.redirect !== '') {
{'fraction_non_alphanumeric': 0.24046076313894887, 'fraction_numerical': 0.0, 'mean_word_length': 4.245283018867925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4031450', 'n_tokens_mistral': 457, 'n_tokens_neox': 436, 'n_words': 104}