Indexed documents are like:
{ id: 1, title: \'Blah\', ... platform: {id: 84, url: \'http://facebook.com\', title: \'Facebook\'} ... }
If you don't necessarily need to get the value of platform.id, you could get away with a single aggregation instead using a script that concatenates the two fields name and url:
platform.id
script
name
url
aggs: { platforms: { terms: {script: 'doc["platform.name"].value + "," + doc["platform.url"].value'} } }