[ https://issues.apache.org/jira/browse/LUCENE-6528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574681#comment-14574681 ]
Adrien Grand commented on LUCENE-6528: -------------------------------------- Unfortunately that's expected: you need to pass doDocScores=true if you want to have scores filled in your ScoreDoc instances. Otherwise Lucene just uses FieldDoc instances instead of ScoreDoc instances with a NaN score and where one of the sort fields is the score. However I agree this is confusing, we should try to fix these APIs to not expose the score if it was not computed. > Sort by SortField.FIELD_SCORE produces NaN scores > ------------------------------------------------- > > Key: LUCENE-6528 > URL: https://issues.apache.org/jira/browse/LUCENE-6528 > Project: Lucene - Core > Issue Type: Bug > Components: core/search > Affects Versions: 5.1 > Reporter: Ahmet Arslan > Labels: sort > Attachments: LUCENE-6528.patch, LUCENE-6528.patch > > > Explicit sort by document score/relevance (SortField.FIELD_SCORE) yields Not > a Number (NaN) scores. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org