Get Distinct value in Elastic App Search

i am using Elastic Enterprise Search for searching document , where i have requirement where i want to get distinct value of 1 field -
for example i want to get distinct brand name available in my engine .
this is my simple search request


    "query": "coke",

    "result_fields": {

        "brand": {

            "raw": {},

            "snippet": {

                "size": 100,

                "fallback": true





but this will give all the record , i know how to get distinct value in elastic search , but am not sure is same is possible in App Search .


Can you give me an example of what results you were expecting to see? Were you expecting to see a list of distinct brand names?


Hi @JasonStoltz

Yes ,
For example if my search engine have thise record

Brand ItemCode ItemDescription
Coke I1 Coke 200 ml
Coke I2 Coke 1.2 ltr
Thumsup I3 Thumsup 500 ltr
Thumsup i4 Thumsup 1 ltr
Fenta i5 fenta 200 ml

so i want result


I understand. I think Facets are the solution you are looking for:

i have looked the facet , yes not thought before but yes may be its can serve the desire input . Thanks

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