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 542679 2007-05-29 22:28:21Z ryan $
See Also:
PhoneticFilter

Field Summary
protected  org.apache.commons.codec.Encoder encoder
           
static java.lang.String ENCODER
           
protected  boolean inject
           
static java.lang.String INJECT
           
protected  java.lang.String name
           
 
Fields inherited from class org.apache.solr.analysis.BaseTokenFilterFactory
args
 
Constructor Summary
PhoneticFilterFactory()
           
 
Method Summary
 org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream input)
          Transform the specified input TokenStream
 void init(java.util.Map<java.lang.String,java.lang.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 java.lang.String ENCODER
See Also:
Constant Field Values

INJECT

public static final java.lang.String INJECT
See Also:
Constant Field Values

inject

protected boolean inject

name

protected java.lang.String name

encoder

protected org.apache.commons.codec.Encoder encoder
Constructor Detail

PhoneticFilterFactory

public PhoneticFilterFactory()
Method Detail

init

public void init(java.util.Map<java.lang.String,java.lang.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 org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream input)
Description copied from interface: TokenFilterFactory
Transform the specified input TokenStream



Copyright © 2006 - 2009 The Apache Software Foundation