I like the first way. It matches how elasticsearch does it http://www.elastic.co/guide/en/elasticsearch/reference/1.x/search-aggregations-bucket-range-aggregation.html
Can we specify explicit ranges in Solr now like we can in elasticsearch? I do like how Solr's version of aggs can be much shorter though! elasticsearch : { "aggs" : { "min_price" : { "min" : { "field" : "price" } } } } solr : { facet : { min_price : "min(price)" } } Great work! On Fri, Apr 17, 2015 at 12:20 PM, Yonik Seeley <ysee...@gmail.com> wrote: > Does anyone have any thoughts on the current general structure of JSON facets? > The current general form of a facet command is: > > <facet_name> : { <facet_type> : <facet_args> } > > For example: > > top_authors : { terms : { > field : author, > limit : 5, > }} > > One alternative I considered in the past is having the type in the args: > > top_authors : { > type : terms, > field : author, > limit : 5 > } > > It's a flatter structure... probably better in some ways, but worse in > other ways. > Thoughts / preferences? > > -Yonik > > > On Tue, Apr 14, 2015 at 4:30 PM, Yonik Seeley <ysee...@gmail.com> wrote: >> Folks, there's a new JSON Facet API in the just released Solr 5.1 >> (actually, a new facet module under the covers too). >> >> It's marked as experimental so we have time to change the API based on >> your feedback. So let us know what you like, what you would change, >> what's missing, or any other ideas you may have! >> >> I've just started the documentation for the reference guide (on our >> confluence wiki), so for now the best doc is on my blog: >> >> http://yonik.com/json-facet-api/ >> http://yonik.com/solr-facet-functions/ >> http://yonik.com/solr-subfacets/ >> >> I'll also be hanging out more on the #solr-dev IRC channel on freenode >> if you want to hit me up there about any development ideas. >> >> -Yonik --Mike