[
https://issues.apache.org/jira/browse/LUCENE-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045546#comment-14045546
]
Hoss Man edited comment on LUCENE-5790 at 6/27/14 6:23 PM:
-----------------------------------------------------------
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}
*EDIT*: ment to have: {{if (!(exists || b.exists) ) return 0;}}
was (Author: hossman):
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, 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.
> Thread:
> https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201406.mbox/%3c84f86fce4b8f42268048aecfb2806...@sixpr04mb045.apcprd04.prod.outlook.com%3E
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]