OpenSearch/plugins/analysis-phonetic/rest-api-spec/test/analysis_phonetic/20_double_metaphone.yaml

34 lines
1023 B
YAML

# 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
- do:
cluster.health:
wait_for_status: yellow
- do:
indices.analyze:
index: phonetic_sample
analyzer: my_analyzer
text: supercalifragilisticexpialidocious
- length: { tokens: 1 }
- match: { tokens.0.token: SPRKLF }