I am trying to randomly select / shuffle a group of nodes to set properties. What I currently have does this 19 times, but I just need it done once. This feels like a simple thing I am missing.
UNWIND apoc.coll.shuffle(range(1,19,1)) AS value
MATCH (th:TerrainHex {id: value})
UNWIND [["Fields", "Grain"],
["Fields", "Grain"],
["Fields", "Grain"],
["Fields", "Grain"],
["Forest", "Wood"],
["Forest", "Wood"],
["Forest", "Wood"],
["Forest", "Wood"],
["Pasture", "Wool"],
["Pasture", "Wool"],
["Pasture", "Wool"],
["Pasture", "Wool"],
["Mountains", "Ore"],
["Mountains", "Ore"],
["Mountains", "Ore"],
["Hills", "Brick"],
["Hills", "Brick"],
["Hills", "Brick"],
["Desert", "None"]] as hexName
SET th.name = hexName[0],
th.resource = hexName[1]