diff --git a/src/java/org/apache/solr/analysis/GreekLowerCaseFilterFactory.java b/src/java/org/apache/solr/analysis/GreekLowerCaseFilterFactory.java index 0f764bc35d8..05490ac7acd 100644 --- a/src/java/org/apache/solr/analysis/GreekLowerCaseFilterFactory.java +++ b/src/java/org/apache/solr/analysis/GreekLowerCaseFilterFactory.java @@ -19,26 +19,25 @@ package org.apache.solr.analysis; -import java.util.HashMap; import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.el.GreekLowerCaseFilter; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class GreekLowerCaseFilterFactory extends BaseTokenFilterFactory { - - private static Logger logger = LoggerFactory.getLogger(GreekLowerCaseFilterFactory.class); - + @Override public void init(Map args) { super.init(args); - + if (args.containsKey("charset")) + throw new SolrException(ErrorCode.SERVER_ERROR, + "The charset parameter is no longer supported. " + + "Please process your documents as Unicode instead."); } + public GreekLowerCaseFilter create(TokenStream in) { return new GreekLowerCaseFilter(in); } diff --git a/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java b/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java index 316f27e41e9..53c424dc63e 100644 --- a/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java +++ b/src/java/org/apache/solr/analysis/RussianLetterTokenizerFactory.java @@ -21,9 +21,19 @@ import java.io.Reader; import java.util.Map; import org.apache.lucene.analysis.ru.RussianLetterTokenizer; +import org.apache.solr.common.SolrException; +import org.apache.solr.common.SolrException.ErrorCode; public class RussianLetterTokenizerFactory extends BaseTokenizerFactory { + @Override + public void init(Map args) { + super.init(args); + if (args.containsKey("charset")) + throw new SolrException(ErrorCode.SERVER_ERROR, + "The charset parameter is no longer supported. " + + "Please process your documents as Unicode instead."); + } public RussianLetterTokenizer create(Reader in) { return new RussianLetterTokenizer(in); diff --git a/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java b/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java index 50fb5cf2d4c..a7f375e51c6 100644 --- a/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java +++ b/src/java/org/apache/solr/analysis/RussianLowerCaseFilterFactory.java @@ -21,9 +21,20 @@ import java.util.Map; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.ru.RussianLowerCaseFilter; +import org.apache.solr.common.SolrException; +import org.apache.solr.common.SolrException.ErrorCode; public class RussianLowerCaseFilterFactory extends BaseTokenFilterFactory { + @Override + public void init(Map args) { + super.init(args); + if (args.containsKey("charset")) + throw new SolrException(ErrorCode.SERVER_ERROR, + "The charset parameter is no longer supported. " + + "Please process your documents as Unicode instead."); + } + public RussianLowerCaseFilter create(TokenStream in) { return new RussianLowerCaseFilter(in); }