2015-07-07 12:47:59 -04:00
|
|
|
# Integration tests for Phonetic analysis components
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
"Double Metaphone":
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: phonetic_sample
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
index:
|
|
|
|
analysis:
|
|
|
|
analyzer:
|
|
|
|
my_analyzer:
|
|
|
|
tokenizer: standard
|
|
|
|
filter: ["standard", "lowercase", "my_metaphone"]
|
|
|
|
filter:
|
|
|
|
my_metaphone:
|
|
|
|
type: phonetic
|
|
|
|
encoder: double_metaphone
|
|
|
|
max_code_len: 6
|
2015-07-07 17:10:32 -04:00
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: yellow
|
2015-07-07 12:47:59 -04:00
|
|
|
- do:
|
|
|
|
indices.analyze:
|
|
|
|
index: phonetic_sample
|
|
|
|
analyzer: my_analyzer
|
|
|
|
text: supercalifragilisticexpialidocious
|
|
|
|
|
|
|
|
- length: { tokens: 1 }
|
|
|
|
- match: { tokens.0.token: SPRKLF }
|
|
|
|
|