I have the following JSON structure (on the top level of my docs) and my question is how do I set my mapping up so that I can aggregate on keyphrases.terms. I know I could recreate the data and create keyphrase objects consisting of the terms and the corresponding weights and use a nested query, but I am trying to avoid having to do that. Any help would be appreciated. Thanks.
Kevin
"keyphrases": {
"terms": [
"account",
"account_log",
"birth_niagara_falls",
"book_download",
"canadian_football"
],
"weights": [
1.0,
1.0,
1.0,
1.0,
1.0
]
}