How to group results in elasticsearch?

前端 未结 4 1321
慢半拍i
慢半拍i 2020-12-29 10:00

I am storing Book Titles in elasticsearch and they all belong to many shops. Like this:

{
    \"books\": [
        {
            \"id\": 1,
            \"tit         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-29 10:55

    On the similar lines with SQL'S GROUP BY Elasticsearch provides aggregation

    With aggregation queries, Elasticsearch responsds with Buckets.

    One bucket corresponds to one category (group).

提交回复
热议问题