sort my results alphabetically on facetnames

2012-02-14 Thread PeterKerk
I want to sort my results on the facetnames (not by their number of results).

So now I have this (ordered by number of results):
Instelling voor auditief gehandicapten (16)
Audiologisch centrum (13)
Huisartsenpraktijk (13)
Instelling voor lichamelijk gehandicapten (13)
Ambulancezorg (12)
Beroepsorganisatie (12)

What I want is this:
Ambulancezorg (12)
Audiologisch centrum (13)
Beroepsorganisatie (12)
Huisartsenpraktijk (13)
Instelling voor auditief gehandicapten (16)
Instelling voor lichamelijk gehandicapten (13)

How can I change my request url to sort differently?

My current request url is like so:
http://localhost:8983/solr/zz_healthorg/select/?indent=onfacet=trueq=*:*fl=idfacet.field=healthorganizationtypes_raw_nlfacet.mincount=1
With the resul below
This XML file does not appear to have any style information associated with
it. The document tree is shown below.
response
lst name=responseHeader
int name=status0/int
int name=QTime1/int
lst name=params
str name=facettrue/str
str name=flid/str
str name=indenton/str
str name=facet.mincount1/str
str name=q*:*/str
str name=facet.fieldhealthorganizationtypes_raw_nl/str
/lst
/lst
result name=response numFound=258 start=0
doc
str name=id1/str
/doc
doc
str name=id2/str
/doc
doc
str name=id3/str
/doc
doc
str name=id4/str
/doc
doc
str name=id5/str
/doc
doc
str name=id6/str
/doc
doc
str name=id7/str
/doc
doc
str name=id8/str
/doc
doc
str name=id9/str
/doc
doc
str name=id10/str
/doc
/result
lst name=facet_counts
lst name=facet_queries/
lst name=facet_fields
lst name=healthorganizationtypes_raw_nl
int name=Instelling voor auditief gehandicapten16/int
int name=Audiologisch centrum13/int
int name=Huisartsenpraktijk13/int
int name=Instelling voor lichamelijk gehandicapten13/int
int name=Ambulancezorg12/int
int name=Beroepsorganisatie12/int
/lst
/lst
lst name=facet_dates/
lst name=facet_ranges/
/lst
/response

--
View this message in context: 
http://lucene.472066.n3.nabble.com/sort-my-results-alphabetically-on-facetnames-tp3743471p3743471.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: sort my results alphabetically on facetnames

2012-02-14 Thread Michael Kuhlmann

Hi!

On 14.02.2012 13:09, PeterKerk wrote:

I want to sort my results on the facetnames (not by their number of results).


From the example you gave, I'd assume you don't want to sort by facet 
names but by facet values.


Simply add facet.sort=index to your request; see
http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort

Or simply sort the facet result on your own.

Greetings,
Kuli