SOLR-1109: PhoneticFilterFactory doesn't handle maxCodeLength param

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@764276 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2009-04-12 02:24:01 +00:00
parent a162755e24
commit 918860396b
1 changed files with 2 additions and 2 deletions

View File

@ -82,12 +82,12 @@ public class PhoneticFilterFactory extends BaseTokenFilterFactory
// Try to set the maxCodeLength // Try to set the maxCodeLength
String v = args.get( "maxCodeLength" ); String v = args.get( "maxCodeLength" );
if( v != null ) { if( v != null ) {
Method setter = encoder.getClass().getMethod( "setMaxCodeLength", Integer.class ); Method setter = encoder.getClass().getMethod( "setMaxCodeLen", int.class );
setter.invoke( encoder, Integer.parseInt( v ) ); setter.invoke( encoder, Integer.parseInt( v ) );
} }
} }
catch (Exception e) { catch (Exception e) {
throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "Error initializing: "+name + "/"+clazz, e ); throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, "Error initializing: "+name + "/"+clazz, e , false);
} }
} }