lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Updated: (LUCENE-462) bad normalization in sorted search returning TopDocs
Date Wed, 09 Nov 2005 22:08:03 GMT
     [ ]

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:
>      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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message