elasticsearch - Getting the count for several document properties by grouping similar values -
I am trying to create a set of filters in the UI for any e object. I want to add all the documents and add some property based on value and want to get a count for each. For example, I want to be able to create a list of available filters such as: State: TX (5) NJ (1) CA (10) Source: Location1 (30) Location 2 (25) Location 3 (22) Where there are different properties of "state" and "source" document type and whose numbers are Bracket I clearly understand that there will be an aggregation request which I want, I only see a little guidance I am here. Ideally I want to do this with a request and do not want multiple requests for every property, I need a group based on the count. So, if I am right, then you want to count the 'state' for each state, And {/ state}: {"conditions": {"field": POST _ / _ search {"size": 0, "ags": {"state": {/ state} : "State"}}}} does th...