lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3410) Make WordDelimiterFilter's instantiation more readable
Date Tue, 06 Sep 2011 14:52:09 GMT


Chris Male commented on LUCENE-3410:

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?

Yeah I thought about this as well.  It would make the iterator clearer since it wouldn't rely
on people looking at the Filter's flags.  I will make the change.

> Make WordDelimiterFilter's instantiation more readable
> ------------------------------------------------------
>                 Key: LUCENE-3410
>                 URL:
>             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:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message