On Dec 14, 2004, at 4:53 AM, Vikas Gupta wrote:
I have come across a scenario where the hits returned are not sorted. Or
maybe they are sorted but the explanation is not correct.


Take a look at
http://cofferdam.cs.utexas.edu:8080/search.jsp? query=space+odyssey&hitsPerPage=10&hitsPerSite=0

This site was down when I tried to access it.

Look at the top 3 results.

Score of Hit 1 is 1.0188559
Score of Hit 2 is 0.9934416
Score of Hit 3 is 1.0188559

I can't explain how score of hit 2 can be < hit 3. I thought the hits that
were returned were sorted.

Hits should be in descending score order by default. Are you using the new Sort facility at all? Are you walking through Hits properly (i.e. hits.doc(i), i is the i-th hit, not document id i)? What version of Lucene are you using?


Sorry - figured I'd rattle off some standard troubleshooting questions :)

FYI, the docs corresponding to hits 1,2 and 3 have exactly the same
scoring fields(By scoring fields, I mean the fields used in the query).

Use the IndexSearcher.explain() feature to get the real scoop on why a score is computed the way it is.


        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to