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

Robert Muir commented on LUCENE-3410:
-------------------------------------

looks good overall, a couple tiny nitpicks:

* looks like there is some dead code in WordDelimiterIterator (the booleans)
* should the iterator maybe keep the booleans and not use flags? just an idea, 
because the iterator doesn't "make use" of all the flags. its also not a public 
class and just a helper class to simplify the filter, so i think its ok for it 
to take 3 booleans?

> Make WordDelimiterFilter's instantiation more readable
> ------------------------------------------------------
>
>                 Key: LUCENE-3410
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3410
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: Chris Male
>            Priority: Minor
>         Attachments: LUCENE-3410.patch
>
>
> Currently WordDelimiterFilter's constructor is:
> {code}
> public WordDelimiterFilter(TokenStream in,
>                                    byte[] charTypeTable,
>                                    int generateWordParts,
>                                    int generateNumberParts,
>                                    int catenateWords,
>                                    int catenateNumbers,
>                                    int catenateAll,
>                                    int splitOnCaseChange,
>                                    int preserveOriginal,
>                                    int splitOnNumerics,
>                                    int stemEnglishPossessive,
>                                    CharArraySet protWords) {
> {code}
> which means its instantiation is an unreadable combination of 1s and 0s.  
> We should improve this by either using a Builder, 'int flags' or an EnumSet.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to