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 :
Ah, I see. In this case you probably have to solve it outside of Elasticsearch- writing a script which executes the aggregation and feeds back the result into a separate index.
Maybe someone else can come up with a better solution. As this isn’t Kibana specific, it probably makes sense to repost this question in the Elasticsearch category.
This is not correct, transform supports other aggs as well, with scripted_metric - despite metric in the name - allows custom code which opens a lot of use cases.
We are expanding the list of supported aggs with every release. Which aggregations do you need?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.