Aggregation on join index

Hi guys,

Is there a way to make aggregation on a related join indices ?

Thanks

Can you give an example of what you’d like to achieve ?

Hi Stephane,

Example:

curl -XGET 'http://localhost:9200/siren/articles/_search?pretty' -d '{
   "query" : {
      "join" : {                      (1)
        "indices" : ["companies"],    (2)
        "on" : ["mentions", "id"],    (3)
        "request" : {                 (4)
          "query" : {
            "term" : {
              "name" : "orient"
            }
          }
        }
      }
    },
    "aggs": {
       "companySiren" : {
            "terms" : { "field" : "companies.siren" } 
        }
    }
}'

I want to get an aggregation based on related field in joined indice.

Is it possible ?

Thanks

@Stephane_Campinas

Have you got a method to achieve my example ?

Thanks