How to implement dynamic aggregation?


(Xudong You) #1

I posted same question on stackoverflow, but would like posting here as well.

By dynamic aggregation I means, the aggregation buckets are different per search query. Take ebay as example, if search for "iphone" https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR12.TRC2.A0.H0.Xiphone.TRS0&_nkw=iphone&_sacat=0

The aggregations in left panel are:

  • Features
  • Network
  • Model
  • Color
  • etc ...

But if search for Book, https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313.TR12.TRC2.A0.H0.Xbook.TRS0&_nkw=book&_sacat=0

The aggregations are:

  • Guaranteed Delivery
  • Condition
  • Price
  • Buying Format
  • etc...

One possible approach is to define same aggregation fields for all documents, and when querying, pass all aggregation fields to query DSL.

But it is so heavy and not flexible.

Is there any simple solutions?


(Xudong You) #2

bump...


(system) #3

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