# Integration tests for ICU analysis component
#
---
"Index ICU content":
    - do:
        indices.create:
            index:  test
            body:
                settings:
                    index:
                        analysis:
                            analyzer:
                                my_analyzer:
                                    tokenizer:  standard
                                    filter: ["lowercase", "my_collator"]
                            filter:
                                my_collator:
                                    type: icu_collation
                                    language: en
                                    strength: primary
                mappings:
                    properties:
                        text:
                            type:     text
                            analyzer: my_analyzer

    - do:
        index:
            index:  test
            id:     "1"
            body:   { "text": "Bâton enflammé" }
    - do:
        indices.refresh: {}

    - do:
        search:
            rest_total_hits_as_int: true
            index: test
            body:
                query:
                    match:
                        text: baton enflamme
    - match: { hits.total: 1 }
