You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2009/06/10 10:11:07 UTC

[jira] Created: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

Make WildcardTermEnum#difference() non-final
--------------------------------------------

                 Key: LUCENE-1679
                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Search
    Affects Versions: 2.9
            Reporter: Simon Willnauer
            Priority: Minor
         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch

The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.

I attached two patches:
 - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
 - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)

Thanks simon

-- 
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] Assigned: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

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

Michael McCandless reassigned LUCENE-1679:
------------------------------------------

    Assignee: Michael McCandless

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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-1679) Make WildcardTermEnum#difference() non-final

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

Simon Willnauer updated LUCENE-1679:
------------------------------------

    Attachment: WildcardTermEnum_cleanup.patch
                WildcardTermEnum.patch

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Priority: Minor
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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-1679) Make WildcardTermEnum#difference() non-final

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

Michael McCandless updated LUCENE-1679:
---------------------------------------

    Fix Version/s: 2.9

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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] Commented: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718051#action_12718051 ] 

Michael McCandless commented on LUCENE-1679:
--------------------------------------------

bq. I created a new patch containing the #close() method. 

Woops, sorry, I was wrong: removing close is fine, since super.close is still there, and since we will no longer assign nulls to the members.

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch, WildcardTermEnum_cleanup_2nd.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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] Commented: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718029#action_12718029 ] 

Michael McCandless commented on LUCENE-1679:
--------------------------------------------

I like the cleanup patch, but, I think we should not remove close()?  Even though it's basically a no-op, removing it breaks back-compat.

Technically, changing the members to final is also a break to back-compat, but I think it's acceptable because WildcardTermEnum basically requires that these are final (ie, you can't up and change say "pre" after creation, because the enum has already been set).

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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-1679) Make WildcardTermEnum#difference() non-final

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

Simon Willnauer updated LUCENE-1679:
------------------------------------

    Attachment: WildcardTermEnum_cleanup_2nd.patch

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch, WildcardTermEnum_cleanup_2nd.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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] Commented: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718069#action_12718069 ] 

Simon Willnauer commented on LUCENE-1679:
-----------------------------------------

I see. I could not thing of anything which would break the backwards compat. when removing the close method. The only thing I could have thought of was some convention I did not know about. So I assume the WildcardTermEnum_cleanup.patch is fine.

simon

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch, WildcardTermEnum_cleanup_2nd.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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] Commented: (LUCENE-1679) Make WildcardTermEnum#difference() non-final

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718039#action_12718039 ] 

Simon Willnauer commented on LUCENE-1679:
-----------------------------------------

I created a new patch containing the #close() method. 
I 100% believe you about your comment but I have a hard time to understand why it breaks back-compat. Could you give me a quick explanation please I might miss something.

Thanks, Simon

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch, WildcardTermEnum_cleanup_2nd.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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-1679) Make WildcardTermEnum#difference() non-final

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

Michael McCandless resolved LUCENE-1679.
----------------------------------------

    Resolution: Fixed

Thanks Simon!

> Make WildcardTermEnum#difference() non-final
> --------------------------------------------
>
>                 Key: LUCENE-1679
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1679
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: WildcardTermEnum.patch, WildcardTermEnum_cleanup.patch, WildcardTermEnum_cleanup_2nd.patch
>
>
> The method WildcardTermEnum#difference() is declared final. I found it very useful to subclass WildcardTermEnum to implement different scoring for exact vs. partial matches. The change is rather trivial (attached)  but I guess it could make life easier for a couple of users.
> I attached two patches:
>  - one which contains the single change to make difference() non-final (WildcardTermEnum.patch)
>  - one which does also contain some minor cleanup of WildcardTermEnum. I removed unnecessary member initialization and made those final. ( WildcardTermEnum_cleanup.patch)
> Thanks simon

-- 
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