37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
# Integration tests for Phonetic analysis components
|
|
#
|
|
|
|
|
|
"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: metaphone
|
|
replace: false
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
- do:
|
|
indices.analyze:
|
|
index: phonetic_sample
|
|
analyzer: my_analyzer
|
|
text: Joe Bloggs
|
|
|
|
- length: { tokens: 4 }
|
|
- match: { tokens.0.token: J }
|
|
- match: { tokens.1.token: joe }
|
|
- match: { tokens.2.token: BLKS }
|
|
- match: { tokens.3.token: bloggs }
|
|
|