[ https://issues.apache.org/jira/browse/LUCENE-7486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-7486: ---------------------------------- Attachment: LUCENE-7486.patch Simple patch. All Lucene Core tests pass. I am not sure if its worth to add some kind of test for this. I also checked the code: It should behave the same as before. The score returned can never be NEGATIVE_INFINITY by default, because DisjSumScorer must at least have one scorer, whose score is always > than NEGATIVE_INFINITY. There is only a difference if one of the subscorers returns a score < 0, which is what this issue wants to fix. The simplest way to test this would be to create a test using a ConstantScoreQuery with a negative score and add it to DisjMaxQuery. I will run all tests later, but for now I posted the patch. > DisjunctionMaxScorer Initializes scoreMax to Zero Preventing From Using > Negative Scores > --------------------------------------------------------------------------------------- > > Key: LUCENE-7486 > URL: https://issues.apache.org/jira/browse/LUCENE-7486 > Project: Lucene - Core > Issue Type: Bug > Components: core/search > Affects Versions: 5.5.2 > Reporter: Ivan Provalov > Assignee: Uwe Schindler > Attachments: LUCENE-7486.patch > > > We are using a log of probability for scoring, which gives us negative > scores. > DisjunctionMaxScorer initializes scoreMax in the score(...) function to zero > preventing us from using negative scores. Is there a reason it couldn't be > initialized to something like this: > float scoreMax = Float.MAX_VALUE * -1; -- 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