You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rishabh Bajpai <r_...@lycos.com> on 2003/03/08 12:31:27 UTC

On sort Orders?????????????

 

are we sure of this?? i was under the impression that Lucene does "first-found-first-returned", and as a result I ended up writing a sorting method on the results? so can i actually do away with that?

secondly, is it an ascending order by relevence or descending order by relevence - as in the term with the highest score comes at the top or at the bottom?

finally, my queryString looks like: 
( title:rishabh^4 OR title:bajpai^4 ) OR ( description:rishabh^3 OR description:bajpai^3 ) OR ( authcontrib:rishabh^2 OR authcontrib:bajpai^2 ) OR ( keywords:rishabh^1 OR keywords:bajpai^1 )

so, will the appropriate score be returned and terms sorted according to that?

-rb


--

On Fri, 7 Mar 2003 13:23:48   
 Aviran Mordo wrote:
>The results are ordered by their score (relevance)
>
>-----Original Message-----
>From: Rick Baker [mailto:rick.baker@dewpoint.com] 
>Sent: Friday, March 07, 2003 11:36 AM
>To: lucene-user@jakarta.apache.org
>Subject: Sort Order
>
>
>What order does Lucene sort in?  In my application the results returned
>are in ascending order which doesn't seem logical.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: On sort Orders?????????????

Posted by Tatu Saloranta <ta...@hypermall.net>.
On Saturday 08 March 2003 04:31, Rishabh Bajpai wrote:
> are we sure of this?? i was under the impression that Lucene does
> "first-found-first-returned", and as a result I ended up writing a sorting
> method on the results? so can i actually do away with that?
> secondly, is it an ascending order by relevence or descending order by
> relevence - as in the term with the highest score comes at the top or at
> the bottom?

I have never done sorting, and results have come in descerding order of 
relevance... and I doubt that could happen by just pure coincidence. :-)
I haven't looked at the sources, but I believe at least the 'high-level' 
access methods do return results in best-match-first order.

> finally, my queryString looks like:
> ( title:rishabh^4 OR title:bajpai^4 ) OR ( description:rishabh^3 OR
> description:bajpai^3 ) OR ( authcontrib:rishabh^2 OR authcontrib:bajpai^2 )
> OR ( keywords:rishabh^1 OR keywords:bajpai^1 )
>
> so, will the appropriate score be returned and terms sorted according to
> that?

If I have understood ranking code properly (from FAQ and previous messages on 
this list; check archives for those), there's no guarantee that term boosted 
by '4' would get 40% weight of resulting score, nor that '1' would get 10%. 
Rather, 4 would mean it gets (relatively speaking) 4 times as big boost 
before normalization as it would by default.
Default weighing depends on frequence of the key term in indexed content as 
far I have understood.

It should be possible to override this if you just want equal weighings 
independent of search term (before boosting; normalization does not alter 
relative weighing), although I haven't gone through ranking code.

-+ Tatu +-


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org