You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Nasseam Elkarra <na...@bodukai.com> on 2009/10/20 23:01:14 UTC

Hierarchical Facet Sorting

We have &facet.sort=true however our hierarchical fields are being  
sorted alphabetically instead of by count.

Here is the field type and field definitions:
<fieldType name="hierarchy" class="solr.HierarchicalFacetField"  
omitNorms="true" positionIncrementGap="0" indexed="true"  
stored="false" delimiter="/"/>
<field name="cat_facet" type="hierarchy" indexed="true" stored="true"  
multiValued="true"/>

Any help is much appreciated.

Thank you,
Nasseam Elkarra
http://bodukai.com/solr/
The fastest possible shopping experience. Now with Solr integration.


Re: Hierarchical Facet Sorting

Posted by Yonik Seeley <yo...@lucidimagination.com>.
What version of Solr are you using?
I just tried this with the latest 1.4-dev version, and it works fine.
http://localhost:8983/solr/select?q=*:*&facet=true&facet.field=cat&facet.sort=true

Note that facet.sort=true/false has been deprecated in Solr 1.4
http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort

-Yonik
http://www.lucidimagination.com



On Tue, Oct 20, 2009 at 5:01 PM, Nasseam Elkarra <na...@bodukai.com> wrote:
> We have &facet.sort=true however our hierarchical fields are being sorted
> alphabetically instead of by count.
>
> Here is the field type and field definitions:
> <fieldType name="hierarchy" class="solr.HierarchicalFacetField"
> omitNorms="true" positionIncrementGap="0" indexed="true" stored="false"
> delimiter="/"/>
> <field name="cat_facet" type="hierarchy" indexed="true" stored="true"
> multiValued="true"/>
>
> Any help is much appreciated.
>
> Thank you,
> Nasseam Elkarra
> http://bodukai.com/solr/
> The fastest possible shopping experience. Now with Solr integration.
>
>