Analysis: Phonetic filter to support `cologne` encoder, closes #942.
This commit is contained in:
parent
44595c06c6
commit
229c03e33f
|
@ -52,10 +52,16 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
this.encoder = new Metaphone();
|
||||
} else if ("soundex".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new Soundex();
|
||||
} else if ("caverphone1".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new Caverphone1();
|
||||
} else if ("caverphone2".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new Caverphone2();
|
||||
} else if ("caverphone".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new Caverphone();
|
||||
this.encoder = new Caverphone2();
|
||||
} else if ("refined_soundex".equalsIgnoreCase(encoder) || "refinedSoundex".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new RefinedSoundex();
|
||||
} else if ("cologne".equalsIgnoreCase(encoder)) {
|
||||
this.encoder = new ColognePhonetic();
|
||||
} else if ("double_metaphone".equalsIgnoreCase(encoder) || "doubleMetaphone".equalsIgnoreCase(encoder)) {
|
||||
DoubleMetaphone doubleMetaphone = new DoubleMetaphone();
|
||||
doubleMetaphone.setMaxCodeLen(settings.getAsInt("max_code_len", doubleMetaphone.getMaxCodeLen()));
|
||||
|
|
|
@ -13,7 +13,7 @@ dependencies {
|
|||
runtime 'org.elasticsearch:es-trove:3.0.0rc1'
|
||||
runtime 'org.elasticsearch:es-jsr166y:20110209'
|
||||
|
||||
runtime 'commons-codec:commons-codec:1.4'
|
||||
runtime 'commons-codec:commons-codec:1.5'
|
||||
|
||||
runtime 'joda-time:joda-time:1.6.1'
|
||||
runtime 'org.mvel:mvel2:2.1.beta2'
|
||||
|
|
Loading…
Reference in New Issue