You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2009/08/26 01:39:59 UTC

[jira] Created: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)

Change NumericRangeQuery to generics (for the numeric type)
-----------------------------------------------------------

                 Key: LUCENE-1857
                 URL: https://issues.apache.org/jira/browse/LUCENE-1857
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Search
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
             Fix For: 3.0


NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T extends Number>

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)

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

Uwe Schindler updated LUCENE-1857:
----------------------------------

    Attachment: LUCENE-1857.patch

Patch that adds generics:
After thinking about it the whole night: The "static ctors" cannot be removed, because even with generics there is not type safety. The private ctor needs the valSize information, to choose the right term encoding. This could theoretically be determined by instanceof checks, but would not work, if you use null for both upper and lower bounds.
This generified version is easier to handle, because it returns the correct type when calling getMin()/getMax(). It also uses generics for its collections api usage.

> Change NumericRangeQuery to generics (for the numeric type)
> -----------------------------------------------------------
>
>                 Key: LUCENE-1857
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1857
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: LUCENE-1857.patch
>
>
> NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T extends Number>

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)

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

Uwe Schindler resolved LUCENE-1857.
-----------------------------------

    Resolution: Fixed

Added CHANGES.txt an committed revision: 820792

> Change NumericRangeQuery to generics (for the numeric type)
> -----------------------------------------------------------
>
>                 Key: LUCENE-1857
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1857
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: LUCENE-1857.patch, LUCENE-1857.patch
>
>
> NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T extends Number>

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)

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

Uwe Schindler updated LUCENE-1857:
----------------------------------

    Priority: Minor  (was: Major)

> Change NumericRangeQuery to generics (for the numeric type)
> -----------------------------------------------------------
>
>                 Key: LUCENE-1857
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1857
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>
>
> NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T extends Number>

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)

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

Uwe Schindler updated LUCENE-1857:
----------------------------------

    Attachment: LUCENE-1857.patch

Updated patch with tests generified and also using autoboxing in javadocs and test code.

> Change NumericRangeQuery to generics (for the numeric type)
> -----------------------------------------------------------
>
>                 Key: LUCENE-1857
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1857
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: LUCENE-1857.patch, LUCENE-1857.patch
>
>
> NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T extends Number>

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org