[ 
https://issues.apache.org/jira/browse/LUCENE-5353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885727#comment-13885727
 ] 

Steve Rowe edited comment on LUCENE-5353 at 1/29/14 8:23 PM:
-------------------------------------------------------------

bq. can we maybe try to not add setters to those Filters. It's generally not a 
good idea to have any mutators on these classes IMO there should be a ctor that 
take these parameters and that entire thing should be immutable.

I agree in theory, but this class has other options which should get the same 
treatment, and presumably other filters have the same issue.  Can you make 
another issue to do across-the-board cleanup?

bq. I also don't think we should keep the public static char array since it's 
mutable as well.

The public static is the default value, so it needs to be there... why not keep 
it public?  Would renaming it to "default"<whatever> do it for you?



was (Author: steve_rowe):
bq. can we maybe try to not add setters to those Filters. It's generally not a 
good idea to have any mutators on these classes IMO there should be a ctor that 
take these parameters and that entire thing should be immutable.

I agree in theory, but this class has other options which should get the same 
treatment, and presumably other filters have the same issue.  Can you make 
another issue to do across-the-board cleanup?

bq. I also don't think we should keep the public static char array since it's 
mutable as well.

The public static is the default value, so it needs to be there... why not keep 
it public?  Would renaming it do "default"<whatever> do it for you?


> ShingleFilter should have a way to specify FILLER_TOKEN
> -------------------------------------------------------
>
>                 Key: LUCENE-5353
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5353
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 4.6
>            Reporter: Simon Willnauer
>            Assignee: Steve Rowe
>             Fix For: 5.0, 4.7
>
>         Attachments: LUCENE-5353.patch, LUCENE-5353.patch, LUCENE-5353.patch
>
>
> Today we have no choice that if pos_inc is > 1 there will be a `_` inserted 
> in between the tokens. We should have the ability to change this character 
> and the char[] that holds it should not be public static since it's mutable.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to