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:31:08 UTC

[jira] Created: (LUCENE-1680) Make prefixLength accessible to PrefixTermEnum subclasses

Make prefixLength accessible to PrefixTermEnum subclasses
---------------------------------------------------------

                 Key: LUCENE-1680
                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
             Project: Lucene - Java
          Issue Type: Improvement
    Affects Versions: 2.9
            Reporter: Simon Willnauer
             Fix For: 2.9
         Attachments: PrefixTermEnum.patch

PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.

Patch is attached.

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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Michael McCandless commented on LUCENE-1680:
--------------------------------------------

bq. Also, I think we can't suddenly change protected methods to private (that breaks back compat).

I meant to say "can't suddenly change add 'final' to protected methods", but I see from your new patch that you understood what I meant anyway :)

Patch looks good -- I'll commit shortly.  Thanks!

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch, PrefixTermEnum_2nd.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Simon Willnauer commented on LUCENE-1680:
-----------------------------------------

You are right, adding a getter for prefix Term is more general. I had a brief look at Term#set and I missed that it is package private. Otherwise it would have been mutable and therefore I would have preferred to just return the prefix length.
I added a new version of the patch. Thanks

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch, PrefixTermEnum_2nd.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Michael McCandless commented on LUCENE-1680:
--------------------------------------------

Should we just add a getter for the prefix Term, to be more general?

Also, I think we can't suddenly change protected methods to private (that breaks back compat).

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Michael McCandless reassigned LUCENE-1680:
------------------------------------------

    Assignee: Michael McCandless

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Simon Willnauer updated LUCENE-1680:
------------------------------------

    Attachment: PrefixTermEnum_2nd.patch

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch, PrefixTermEnum_2nd.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Simon Willnauer updated LUCENE-1680:
------------------------------------

    Attachment: PrefixTermEnum.patch

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Michael McCandless resolved LUCENE-1680.
----------------------------------------

    Resolution: Fixed

Thanks Simon!

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch, PrefixTermEnum_2nd.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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-1680) Make prefixLength accessible to PrefixTermEnum subclasses

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

Simon Willnauer updated LUCENE-1680:
------------------------------------

    Priority: Minor  (was: Major)

> Make prefixLength accessible to PrefixTermEnum subclasses
> ---------------------------------------------------------
>
>                 Key: LUCENE-1680
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1680
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: PrefixTermEnum.patch
>
>
> PrefixTermEnum#difference() offers a way to influence scoring based on the difference between the prefix Term and a term in the enumeration. To effectively use this facility the length of the prefix should be accessible to subclasses. Currently the prefix term is private to PrefixTermEnum. I added a getter for the prefix length and made PrefixTermEnum#endEnum(), PrefixTermEnum#termCompare() final for consistency with other TermEnum subclasses.
> Patch is attached.
> 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