[
https://issues.apache.org/jira/browse/LUCENE-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045546#comment-14045546
]
Hoss Man commented on LUCENE-5790:
----------------------------------
bq. It should be: ...
Even that looks wrong to me based on the mutable contract as it exists -- as
things stand, it seems like the very first check must be {{if (!(exists ==
b.exists) ) return 0;}} ... because if the exist flag on both values is false,
then we should not make any comparison of the values.
Example: shouldn't this assert be valid?
{code}
mvalXXX.value = 42;
mvalYYY.value = 999;
mvalXXX.exists = mvalYYY.exists = false;
assertEquals(0, mvalXXX.compareTo(mvalYYY));
{code}
> MutableValue compareTo impls seem to be broken for exists==false
> ----------------------------------------------------------------
>
> Key: LUCENE-5790
> URL: https://issues.apache.org/jira/browse/LUCENE-5790
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Hoss Man
> Attachments: LUCENE-5790.patch
>
>
> On the solr-user mailing list, Ebisawa & Alex both commented that they've
> noticed bugs in the grouping code when some documents don't have values in
> the grouping field.
> In Ebisawa's case, he tracked this down to what appears to be some bugs in
> the logic of the "compareSameType" method of some of the MutableValue
> implementations.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]