lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <t...@hypermall.net>
Subject Re: On sort Orders?????????????
Date Sat, 08 Mar 2003 22:23:33 GMT
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


Mime
View raw message