48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
|
# Integration tests for ICU analysis component
|
||
|
#
|
||
|
---
|
||
|
"Index ICU content":
|
||
|
- do:
|
||
|
indices.create:
|
||
|
index: test
|
||
|
body:
|
||
|
settings:
|
||
|
index:
|
||
|
analysis:
|
||
|
analyzer:
|
||
|
my_analyzer:
|
||
|
tokenizer: standard
|
||
|
filter: ["standard", "lowercase", "my_collator"]
|
||
|
filter:
|
||
|
my_collator:
|
||
|
type: icu_collation
|
||
|
language: en
|
||
|
strength: primary
|
||
|
mappings:
|
||
|
type:
|
||
|
properties:
|
||
|
text:
|
||
|
type: string
|
||
|
analyzer: my_analyzer
|
||
|
- do:
|
||
|
cluster.health:
|
||
|
wait_for_status: yellow
|
||
|
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: type
|
||
|
id: 1
|
||
|
body: { "text": "Bâton enflammé" }
|
||
|
- do:
|
||
|
indices.refresh: {}
|
||
|
|
||
|
- do:
|
||
|
search:
|
||
|
index: test
|
||
|
body:
|
||
|
query:
|
||
|
match:
|
||
|
text: baton enflamme
|
||
|
- match: { hits.total: 1 }
|