3

How can you do nested facets in ElastiSearch with the Searchkick gem?

I would like to achieve something like this:

  • Category Name
    • median price
    • count
    • min price
    • max price
Avishai
  • 4,512
  • 4
  • 41
  • 67

1 Answers1

0

Searchkick only support term facets, for median price you need stats facets http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-stats-aggregation.html

I suggest you to check elasticsearch-rails or elasticsearch-ruby project. I used to research all elasticsearch related gem, because of elasticsearch syntax is complex, no gem can provide such flexiable DSL. So I like write my own elasticsearch query

allenwei
  • 4,047
  • 5
  • 23
  • 26