Can you open an issue? This is a problem in SnowballAnalyzer missing to add the set ctor.
In 2.9.1 you can only use it with the deprecated array and in 3.0 there it breaks :-) But you can always copy the set into an array using size() and Iterable. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Erick Erickson [mailto:erickerick...@gmail.com] > Sent: Monday, December 14, 2009 6:35 PM > To: java-user@lucene.apache.org > Subject: Re: SnowballAnalyzer and StopAnalyzer.ENGLISH_STOP_WORDS_SET ? > > Hmmm, that does seem a little confusing... Have you tried using > ENGLISH_STOP_WORDS_SET.toArray()? > > WARNING: I haven't tried this myself and don't have access to > a test bed.... > > Erick > > On Mon, Dec 14, 2009 at 7:55 AM, Nick Burch <n...@torchbox.com> wrote: > > > Hi All > > > > I'm upgrading my code from 2.4 to 2.9, and I've hit an issue with > > deprecations. > > > > My old code was: > > new SnowballAnalyzer("English", StopAnalyzer.ENGLISH_STOP_WORDS); > > > > Looking at the JavaDocs, I'd expected that the new format would be: > > new SnowballAnalyzer(Version.LUCENE_CURRENT, "English", > > StopAnalyzer.ENGLISH_STOP_WORDS_SET); > > > > However, while StopAnalyzer has depcrecated ENGLISH_STOP_WORDS in favour > of > > ENGLISH_STOP_WORDS_SET, and while SnowballAnalyzer seems to use a Set > based > > stopwords list internally, there doesn't seem to be a constructor for > > SnowballAnalyzer that takes a set, only a String[] one > > > > Has anyone hit this before? Am I safe to make a patch to > SnowballAnalyzer > > to create a matching constructor taking Set rather than String[] so I > can > > use the non deprecated stopwords from StopAnalyzer, or am I barking up > the > > wrong tree here? > > > > Thanks > > Nick > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org