You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Bernhard Altendorfer (JIRA)" <ji...@apache.org> on 2017/05/17 17:00:09 UTC
[jira] [Created] (LUCENE-7833) Returning minimum instead of maximum
in ToParentBlockJoinQuery.BlockJoinScorer.setScoreAndFreq
Bernhard Altendorfer created LUCENE-7833:
--------------------------------------------
Summary: Returning minimum instead of maximum in ToParentBlockJoinQuery.BlockJoinScorer.setScoreAndFreq
Key: LUCENE-7833
URL: https://issues.apache.org/jira/browse/LUCENE-7833
Project: Lucene - Core
Issue Type: Bug
Reporter: Bernhard Altendorfer
We recently upgraded our Elasticsearch cluster from 5.3 to 5.4 and found a bug when we score nested documents.
I spent some time to check the code from Elasticsearch and Lucene and I found a problem in ToParentBlockJoinQuery.BlockJoinScorer.setScoreAndFreq.
In the switch statement for the scoreMode in the case "Max" the function Math.min is used and I guess it should be Math.max.
This would explain our problem in Elasticsearch because we see exactly the problem that instead of the maximum the minimum is returned.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org