[email protected]
[Top] [All Lists]

[jira] Updated: (LUCENE-462) bad normalization in sorted search returnin

Subject: [jira] Updated: (LUCENE-462) bad normalization in sorted search returning TopDocs
From: "Yonik Seeley (JIRA)"
Date: Wed, 9 Nov 2005 23:08:03 +0100 CET
     [ 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: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>