SOLR-837: Fix inject parameter on PhoneticFilterFactory and DoubleMetaphoneFilterFactory

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@711737 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2008-11-05 23:06:08 +00:00
parent beb67ada0f
commit 3c8e56ecc3
4 changed files with 7 additions and 8 deletions

View File

@ -99,6 +99,9 @@ Bug Fixes
tokens that started with delimiters, leading to incorrect highlighting.
(Stefan Oestreicher via yonik)
6. SOLR-837: Fix inject parameter on PhoneticFilterFactory and DoubleMetaphoneFilterFactory.
(ehatcher)
Other Changes
----------------------

View File

@ -34,9 +34,7 @@ public class DoubleMetaphoneFilterFactory extends BaseTokenFilterFactory
public void init(Map<String, String> args) {
super.init(args);
if (args.get(INJECT) != null) {
inject = Boolean.getBoolean(args.get(INJECT));
}
inject = getBoolean(INJECT, true);
if (args.get(MAX_CODE_LENGTH) != null) {
maxCodeLength = Integer.parseInt(args.get(MAX_CODE_LENGTH));

View File

@ -63,10 +63,8 @@ public class PhoneticFilterFactory extends BaseTokenFilterFactory
@Override
public void init(Map<String,String> args) {
super.init( args );
if( args.get( "inject" ) != null ) {
inject = Boolean.getBoolean( args.get( INJECT ) );
}
inject = getBoolean(INJECT, true);
String name = args.get( ENCODER );
if( name == null ) {

View File

@ -50,7 +50,7 @@ import java.util.Map;
public interface TokenFilterFactory {
/** <code>init</code> will be called just once, immediately after creation.
* <p>The args are user-level initialization parameters that
* may be specified when declaring a the factory in the
* may be specified when declaring the factory in the
* schema.xml
*/
public void init(Map<String,String> args);