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 vanderkerkoff <mj...@glam.ac.uk> on 2007/11/01 17:23:57 UTC

sorting results

sorry to be a numptie but can someone tell me how I change my results sort
mechanism?

It currently gives back the results ordered by highest ID first, which
relates to last item entered or edited.

I'd like it to sort alpha on the Title field instead.

I'm using solr 1.1 and the example solr install from the download.  I've
made some adjustments to the config file, but I don't really know whats
going on in there.

Any help would be greatly appreciated.
-- 
View this message in context: http://www.nabble.com/sorting-results-tf4732442.html#a13532142
Sent from the Solr - User mailing list archive at Nabble.com.


Re: sorting results

Posted by Chris Hostetter <ho...@fucit.org>.
: sorry to be a numptie but can someone tell me how I change my results sort
: mechanism?

: I'm using solr 1.1 and the example solr install from the download.  I've

check the copy of hte tutorial that is included with your version of Solr 
... it describes how to do sorting with teh standard request handler 
(quick answer: put "; title asc" at the end of your q param)

if you are using dismax (that was in Solr 1.1 right?) then it's a seperate 
"sort" param just like StandardREquestHandler uses right now (ie: 
q=bob+dole&sort=title+asc

in either case, you need a field named "title" which is indexed and can't 
have multi-values ... which means if you use a TextField it needs to use 
KeywordTokenizer.  fields you search on don't typically work well as sort 
fields for this reason, but using <copyField> in your schema can give you 
one version for searching and one version forsorting.

-Hoss