code: function buildRefValues (indexes, data) {
    let v
    const ret = {}
    for (v in indexes) {
      if (indexes.hasOwnProperty(v)) {
        const path = indexes[v].path
        const name = indexes[v].name
        const indexType = indexes[v].indexType
  
        let value = null
        if (indexes[v].compound) {
          value = _.map(path, p => processValue(mpath.get(p, data)))
          value = expandValues(value)
          value = _.compact(value)
  
          const containsNested = _.some(value, _.isArray)
          if (containsNested) {
            value = _.map(value, v => v.join('_'))
          } else {
            value = value.join('_')
          }
        } else {
          value = processValue(mpath.get(path, data))
        }
  
        if (indexes[v].refKeyCase === REF_KEY_CASE.UPPER) {
          value = value.toUpperCase()
        } else if (indexes[v].refKeyCase === REF_KEY_CASE.LOWER) {
          value = value.toLowerCase()
        }
  
        ret[name] = {
          path,
          value,
          name,
          indexType
        }
      }
    }
  
    return ret
  }
docs: /*!
  Builds ref document values
  @param indexes
  @param data
  @returns {{}}