mirror of https://github.com/apache/lucene.git
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:
parent
beb67ada0f
commit
3c8e56ecc3
|
@ -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
|
||||
----------------------
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue