Dynamic way of building aggregation query using java api client

Hi Team,

Can someone please help with sample code to create aggregate query dynamically based on the given list of fields using Elasticsearch Java API Client. Unfortunately I couldn't get much documentation help on this.
Scenario:

  1. I have list of fields ["gender","fashion","winter"]
  2. I want to create nested aggregation query on above fields dynamically, which means if I have only 2 fields, I should get only 2 level nested aggregation query

Thanks & Regards,
Ram Prasad G

Hi Team,

Any help here will be appreciated.

Thanks & Regards,
Ram Prasad G

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