How to create an index_2 containing Index_1's aggregations results?

How to create an index_2 containing Index_1's aggregations results as fields ?

Is it possible to use a command like this on kibana dev tools ?

PUT /index_2/doc_aggs_results_of_index1
{
field_aggs1: ...
field_aggs2: ...
{

For example:
Index_1 contains:
{
doc1:
name : Superman
city: New-York
date: 01-05-2015
}
{
doc2:
name : Batman
city: Los Angeles
date: 22-07-2018
}
{
doc3:
name : Superman
city: Sidney
date: 12-10-2017
}
{
doc4:
name : Batman
city: Paris
date: 17-02-2018
}

And I'd like to create index that aggregates or queries on index_1 to make index_2 :

Index_2 contains:
{
doc1:
name: Superman,
cities: [
{
city: New-York,
date: 01-05-2015
},
{
city: Sidney,
date: 12-10-2017
}]
},

{
doc2:
name: Batman,
cities: [
{
city: Los Angeles,
date: 22-07-2018
},
{
city: Paris,
date: 17-02-2018
}]
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.