give the error message we promised in Solr 1.4 if you use these charsets

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/solr@922964 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-03-14 21:16:47 +00:00
parent 65a21459a2
commit f2a3f30ebd
3 changed files with 27 additions and 7 deletions

View File

@ -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<String, String> 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);
}

View File

@ -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<String, String> 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);

View File

@ -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<String, String> 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);
}