org.apache.solr.analysis
Class PhoneticFilterFactory
java.lang.Object
org.apache.solr.analysis.BaseTokenFilterFactory
org.apache.solr.analysis.PhoneticFilterFactory
- All Implemented Interfaces:
- TokenFilterFactory
public class PhoneticFilterFactory
- extends BaseTokenFilterFactory
Create tokens based on phonetic encoders
http://jakarta.apache.org/commons/codec/api-release/org/apache/commons/codec/language/package-summary.html
This takes two arguments:
"encoder" required, one of "DoubleMetaphone", "Metaphone", "Soundex", "RefinedSoundex"
"inject" (default=true) add tokens to the stream with the offset=0
- Version:
- $Id: PhoneticFilterFactory.java 542679 2007-05-29 22:28:21Z ryan $
- See Also:
PhoneticFilter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCODER
public static final String ENCODER
- See Also:
- Constant Field Values
INJECT
public static final String INJECT
- See Also:
- Constant Field Values
inject
protected boolean inject
name
protected String name
encoder
protected org.apache.commons.codec.Encoder encoder
PhoneticFilterFactory
public PhoneticFilterFactory()
init
public void init(Map<String,String> args)
- Description copied from interface:
TokenFilterFactory
init
will be called just once, immediately after creation.
The args are user-level initialization parameters that
may be specified when declaring a the factory in the
schema.xml
- Specified by:
init
in interface TokenFilterFactory
- Overrides:
init
in class BaseTokenFilterFactory
create
public TokenStream create(TokenStream input)
- Description copied from interface:
TokenFilterFactory
- Transform the specified input TokenStream
Copyright © 2006 - 2009 The Apache Software Foundation