You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Harish Agarwal (JIRA)" <ji...@apache.org> on 2010/10/26 17:00:24 UTC

[jira] Created: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Grouping treats null values as equivalent to 0 or an empty string
-----------------------------------------------------------------

                 Key: SOLR-2198
                 URL: https://issues.apache.org/jira/browse/SOLR-2198
             Project: Solr
          Issue Type: Sub-task
            Reporter: Harish Agarwal


The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Resolved: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-2198.
--------------------------------

    Resolution: Fixed

OK, I added random testing support and committed.

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch, SOLR-2198.patch, SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated SOLR-2198:
-------------------------------

    Attachment: SOLR-2198.patch

Here's an updated patch based on Harish's patch, with support for additional field types, with some additional changes.
- always set the value, regardless of the value of exists - this simplifies hashCode
- move the comparison of "exists" into subclasses so equalsSameTypecan be directly used by comparators
- add support in compareTo

This is untested - I don't know if it works yet.  There are other issues with random testing and sorting null values that I need to iron out first.

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch, SOLR-2198.patch, SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Harish Agarwal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harish Agarwal updated SOLR-2198:
---------------------------------

    Attachment: SOLR-2198.patch

I attached a patch which seems to fix the problem for fields using [Int, Long, Double, Float]FieldSource's.   I made the 'exists' property on MutableValue's public and am using it to denote null values, all the non-grouping tests still pass.

I'm still having trouble figuring out how to distinguish between a null string and "" - is this even possible?

It would be good to get some feedback on the patch before I try to extend this to other field types (like SortableFields).

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch, SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925122#action_12925122 ] 

Yonik Seeley commented on SOLR-2198:
------------------------------------

Yep, this is currently expected.

Now that all fields can tell if there was a value or not for a given doc, we should update function query, and mutable value to reflect this.

bq. A related and relevant issue is figuring out how to denote null values in the 'groupValue' field. Its still useful to group missing values together. 

groupValue=null

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Harish Agarwal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harish Agarwal updated SOLR-2198:
---------------------------------

    Attachment: SOLR-2198.patch

Attaching a patch for grouping tests which illustrates the problem.

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Harish Agarwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933575#action_12933575 ] 

Harish Agarwal commented on SOLR-2198:
--------------------------------------

Wanted to check in on this issue, have any commiters had a chance to look at the patch?  What do I need to do to move this forward?  Thanks!

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch, SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2198) Grouping treats null values as equivalent to 0 or an empty string

Posted by "Harish Agarwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924988#action_12924988 ] 

Harish Agarwal commented on SOLR-2198:
--------------------------------------

A related and relevant issue is figuring out how to denote null values in the 'groupValue' field.  Its still useful to group missing values together.

> Grouping treats null values as equivalent to 0 or an empty string
> -----------------------------------------------------------------
>
>                 Key: SOLR-2198
>                 URL: https://issues.apache.org/jira/browse/SOLR-2198
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Harish Agarwal
>         Attachments: SOLR-2198.patch
>
>
> The grouping function does not distinguish between missing values and their null type equivalents (0 for numeric types and an empty string for string types). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org