Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 40101 invoked from network); 13 Feb 2010 13:18:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Feb 2010 13:18:50 -0000 Received: (qmail 62781 invoked by uid 500); 13 Feb 2010 13:18:49 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 62712 invoked by uid 500); 13 Feb 2010 13:18:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 62702 invoked by uid 99); 13 Feb 2010 13:18:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Feb 2010 13:18:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Feb 2010 13:18:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E4FEC29A0015 for ; Sat, 13 Feb 2010 05:18:27 -0800 (PST) Message-ID: <833347510.253121266067107936.JavaMail.jira@brutus.apache.org> Date: Sat, 13 Feb 2010 13:18:27 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2165) SnowballAnalyzer lacks a constructor that takes a Set of Stop Words In-Reply-To: <472185760.1260876078528.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-2165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Schindler updated LUCENE-2165: ---------------------------------- Fix Version/s: 2.9.2 backport > SnowballAnalyzer lacks a constructor that takes a Set of Stop Words > ------------------------------------------------------------------- > > Key: LUCENE-2165 > URL: https://issues.apache.org/jira/browse/LUCENE-2165 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/analyzers > Affects Versions: 2.9.1, 3.0 > Reporter: Nick Burch > Assignee: Robert Muir > Priority: Minor > Fix For: 2.9.2, 3.0.1, 3.1 > > Attachments: LUCENE-2165.patch > > > As discussed on the java-user list, the SnowballAnalyzer has been updated to use a Set of stop words. However, there is no constructor which accepts a Set, there's only the original String[] one > This is an issue, because most of the common sources of stop words (eg StopAnalyzer) have deprecated their String[] stop word lists, and moved over to Sets (eg StopAnalyzer.ENGLISH_STOP_WORDS_SET). So, for now, you either have to use a deprecated field on StopAnalyzer, or manually turn the Set into an array so you can pass it to the SnowballAnalyzer > I would suggest that a constructor is added to SnowballAnalyzer which accepts a Set. Not sure if the old String[] one should be deprecated or not. > A sample patch against 2.9.1 to add the constructor is: > --- SnowballAnalyzer.java.orig 2009-12-15 11:14:08.000000000 +0000 > +++ SnowballAnalyzer.java 2009-12-14 12:58:37.000000000 +0000 > @@ -67,6 +67,12 @@ > stopSet = StopFilter.makeStopSet(stopWords); > } > > + /** Builds the named analyzer with the given stop words. */ > + public SnowballAnalyzer(Version matchVersion, String name, Set stopWordsSet) { > + this(matchVersion, name); > + stopSet = stopWordsSet; > + } > + -- 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