How do you get nested facets with Searchkick/ElasticSearch

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

Answers


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


Need Your Help

Json file gives 403 error on server

javascript json http-status-code-403

I have a json file contianing data which I access through javascript. On my virtual MAMP server on mac It works, but on my online server when I load the HTML file I cant access the json file from

how can i update the menu before the menu button is pressed

java android menu oncreateoptionsmenu

i created a menu that needs to change depending on user input and the menu does change but only once the user opens the menu twice. my guess is that the original menu is built by public boolean