Yes. Just as you'd expect: &sort=score asc,date desc,title asc [url encoded of course]
The only trick is knowing the special key 'score' for sorting by relevancy. This is all in the wiki docs: http://wiki.apache.org/solr/CommonQueryParameters#sort Also keep in mind, as the docs say, sorting only works properly on non-tokenized single-value fields, which makes sense if you think about it. ________________________________________ From: Dennis Gearon [[email protected]] Sent: Friday, September 17, 2010 1:00 PM To: [email protected] Subject: Re: Can i do relavence and sorting together? Well .. > because the date sort overrides all the scoring, by > definition. THAT'S not good for what I want, LOL! Is there any way to chain things like distance, date, relevancy, an integer field to force sort oder, like when using SQL 'SORT BY', the order of sort is the order of listing? Dennis Gearon Signature Warning ---------------- EARTH has a Right To Life, otherwise we all die. Read 'Hot, Flat, and Crowded' Laugh at http://www.yert.com/film.php --- On Fri, 9/17/10, Erick Erickson <[email protected]> wrote: > From: Erick Erickson <[email protected]> > Subject: Re: Can i do relavence and sorting together? > To: [email protected] > Date: Friday, September 17, 2010, 6:10 AM > What is it about the standard > relevance ranking that doesn't suit your > needs? > > And note that if you sort by your date field, relevance > doesn't matter at > all > because the date sort overrides all the scoring, by > definition. > > Best > Erick > > On Fri, Sep 17, 2010 at 6:57 AM, Pawan Darira <[email protected]>wrote: > > > Hi > > > > My index have fields named ad_title, ad_description > & ad_post_date. Let's > > suppose a user searches for more than one keyword, > then i want the > > documents > > with maximum occurence of all the keywords together > should come on top. The > > more closer the keywords in ad_title & > ad_description should be given top > > priority. > > > > Also, i want that these results should be sorted on > ad_post_date. > > > > Please suggest!!! > > > > -- > > Thanks, > > Pawan Darira > > >
