org.apache.solr.analysis
Class PhoneticFilterFactory

java.lang.Object
  extended by org.apache.solr.analysis.BaseTokenFilterFactory
      extended by 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 764276 2009-04-12 02:24:01Z yonik $
See Also:
PhoneticFilter

Field Summary
protected  org.apache.commons.codec.Encoder encoder
           
static String ENCODER
           
protected  boolean inject
           
static String INJECT
           
protected  String name
           
 
Fields inherited from class org.apache.solr.analysis.BaseTokenFilterFactory
args, log
 
Constructor Summary
PhoneticFilterFactory()
           
 
Method Summary
 PhoneticFilter create(TokenStream input)
          Transform the specified input TokenStream
 void init(Map<String,String> args)
          init will be called just once, immediately after creation.
 
Methods inherited from class org.apache.solr.analysis.BaseTokenFilterFactory
getArgs, getBoolean, getBoolean, getInt, getInt, getInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

PhoneticFilterFactory

public PhoneticFilterFactory()
Method Detail

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 the factory in the schema.xml

Specified by:
init in interface TokenFilterFactory
Overrides:
init in class BaseTokenFilterFactory

create

public PhoneticFilter create(TokenStream input)
Description copied from interface: TokenFilterFactory
Transform the specified input TokenStream



Copyright © 2010 Apache Software Foundation. All Rights Reserved.