Hi @Peter This is actually the requirement. We have. For both sort options (index, count) we would like to have the possibility to add the desc option.
Instead of this result q=*:*&facet=true&facet.field=image_text&facet.sort=index&rows=0 <lst name="facet_fields"> <lst name="image_text"> <int name="a">12</int> <int name="b">23</int> <int name="c">200/int> </lst> </lst> We would like to add desc to the sort option like facet.sort=index,desc to get the following result <lst name="facet_fields"> <lst name="image_text"> <int name="c">200</int> <int name="b">23</int> <int name="a">12/int> </lst> </lst> Bests Sandro -----Ursprüngliche Nachricht----- Von: Peter Sturge [mailto:peter.stu...@gmail.com] Gesendet: Dienstag, 10. September 2013 11:17 An: solr-user@lucene.apache.org Betreff: Re: Facet sort descending Hi, This question could possibly be about rare idr facet counting - i.e. retrun the facets counts with the least values. I remember doing a patch for this years ago, but then it broke when some UninvertedField facet optimization came in around ~3.5 time. It's a neat idea though to have an option to show the 'rarest N' facets not just the 'top N'. Thanks, Peter On Mon, Sep 9, 2013 at 11:43 PM, Chris Hostetter <hossman_luc...@fucit.org>wrote: > > : Is there a plan to add a descending sort order for facet queries ? > : Best regards Sandro > > I don't understand your question. > > if you specify multiple facet.query params, then the constraint counts > are returned in the order they were initially specified -- there is no > need for server side sorting, because they all come back (as opposed > to facet.field where the number of constraints can be unbounded and > you may request just the top X using facet.limit) > > If you are asking about facet.field and using facet.sort to specify > the order of the constraints for each field, then no -- i don't > believe anyone is currently working on adding options for descending sort. > > I don't think it would be hard to add if someone wanted to ... I just > don't know that there has ever been enough demand for anyone to look > into it. > > > -Hoss >