You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2015/08/05 01:49:04 UTC
[jira] [Commented] (LUCENE-6719) NumericUtils.getMinLong and
NumericUtils.getMaxLong have undefined behavior when no docs have value -
throw NPE
[ https://issues.apache.org/jira/browse/LUCENE-6719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14654543#comment-14654543 ]
Michael McCandless commented on LUCENE-6719:
--------------------------------------------
Thanks for tracking this down [~hossman].
Instead of adding new methods can you just fix the current ones? I think it's weird to have {{getMinLong}} and {{getMinimumLong}}, and I think it's OK to upgrade from int to Integer return value.
> NumericUtils.getMinLong and NumericUtils.getMaxLong have undefined behavior when no docs have value - throw NPE
> ---------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-6719
> URL: https://issues.apache.org/jira/browse/LUCENE-6719
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: LUCENE-6719.patch, LUCENE-6719.patch
>
>
> Tracked down a possible cause of SOLR-7866 to situations where a (numeric) field doesn't have any values in an index and you try to get the min/max.
> javadocs for NumericUtils.getMinLong and NumericUtils.getMaxLong don't actually say what that method will do in this case, throw NPE when it happens
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org