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

Hi @kalypso63,

Sorry for the late reply.
What you want to achieve is not yet possible, but will be in with the 20 release of Federate. You will be able to access the companies.siren field from a scripted aggregation.

Cheers,

@Stephane_Campinas, we are also facing similar issue - aggregation based on related field in joined indice. Can you please share an example how to add this “scripted aggregation” mentioned above ( You will be able to access the companies.siren field from a scripted aggregation)

Hi @jeffPowers,

This feature is not yet released (will be in 20). I will link to the documentation once it’s out.

Cheers,