lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-462) bad normalization in sorted search returning TopDocs
Date Wed, 09 Nov 2005 22:08:03 GMT
     [ http://issues.apache.org/jira/browse/LUCENE-462?page=all ]

Yonik Seeley updated LUCENE-462:
--------------------------------

    Attachment: FieldSortedHitQueue_maxscore.patch

Proposed patch attached:
 - insert(FieldDoc) keeps track of maxscore and calls super.insert(Object)
 - the maximum score is now kept track of, even if it is less than 1.0
 - getMaxScore() added

This should also be slightly faster than the old way since there are only "n" comparisons
against maxscore.
Previously, two comparisons would be done for every call to lessThan() (2*nlog(n) maybe?)

> bad normalization in sorted search returning TopDocs
> ----------------------------------------------------
>
>          Key: LUCENE-462
>          URL: http://issues.apache.org/jira/browse/LUCENE-462
>      Project: Lucene - Java
>         Type: Bug
>     Reporter: Yonik Seeley
>     Assignee: Yonik Seeley
>     Priority: Minor
>  Attachments: FieldSortedHitQueue_maxscore.patch
>
> FieldSortedHitQueue.maxscore is maintained in the lessThan method (which never gets called
if a single document is added to the queue).
> I've checked in a test to TestSort.testTopDocsScores() with the final assertion commented
out.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message