function createSearchIndex(node) {
  // Get all values of SEARCH_FIELDS in the current node
  let values = $.map(SEARCH_FIELDS, field => getIn(node, field))
  // Flatten values and get distinct list
  return Arrays.distinct(Arrays.flatten(values))
}
/**
 * Generate list of all values of SEARCH_FIELDS for given node to use later as
 * a search index
 */
Generate list of all values of SEARCH_FIELDS for given node to use later as
a search index
Generate list of all values of SEARCH_FIELDS for given node to use later as a search index
function createSearchIndex(node) {
  let values = $.map(SEARCH_FIELDS, field => getIn(node, field))
  return Arrays.distinct(Arrays.flatten(values))
}
function createSearchIndex ( node ) { let values = $ . map ( SEARCH_FIELDS , field => getIn ( node , field ) ) return Arrays . distinct ( Arrays . flatten ( values ) ) }
Generate list of all values of SEARCH_FIELDS for given node to use later as
 a search index
Generate list of all values of SEARCH_FIELDS for given node to use later as a search index
// Get all values of SEARCH_FIELDS in the current node // Flatten values and get distinct list