# Integration tests for Smartcn analysis component
#
---
"Index Smartcn content":
    - do:
        indices.create:
            index:  test
            body:
                mappings:
                    properties:
                        text:
                            type:     text
                            analyzer: smartcn

    - do:
        index:
            index:  test
            id:     "1"
            body:   { "text": "我购买了道具和服装" }
    - do:
        indices.refresh: {}

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