imports:
    - { resource: ./../config/config.yml }

twig:
    debug: %kernel.debug%

fos_elastica:
    clients:
        default:
            connections:
                - url: http://%fos_elastica.host%:%fos_elastica.port%
                - host: %fos_elastica.host%
                  port: %fos_elastica.port%
            connectionStrategy: RoundRobin
        second_server:
            connections:
                - url: http://%fos_elastica.host%:%fos_elastica.port%
            connection_strategy: RoundRobin
        third:
            url: http://%fos_elastica.host%:%fos_elastica.port%
    indexes:
        index:
            index_name: foselastica_basic_test_%kernel.environment%
            settings:
                analysis:
                    analyzer:
                        my_analyzer:
                            type: custom
                            tokenizer: lowercase
                            filter: [my_ngram]
                    filter:
                        my_ngram:
                            type: "nGram"
                            min_gram: 3
                            max_gram: 5
            types:
                parent:
                    dynamic: false
                    dynamic_templates:
                        dates:
                            match: "date_*"
                            mapping:
                                type: date
                    mappings:
                        field1: ~
                        field2: ~
                type:
                    dynamic: strict
                    date_detection: false
                    dynamic_date_formats: [ 'yyyy-MM-dd' ]
                    dynamic_templates:
                        - dates:
                            match: "date_*"
                            mapping:
                                type: date
                        - strings:
                            match: "*"
                            mapping:
                                analyzer: english
                                type: string
                    numeric_detection: true
                    properties:
                        field1: ~
                        field2:
                            store: false
                        date: { boost: 5 }
                        completion:
                            type: completion
                        title: { boost: 8, analyzer: my_analyzer }
                        content: ~
                        comments:
                            type: "nested"
                            properties:
                                date: { boost: 5 }
                                content: ~
                        multiple:
                            type: string
                            fields:
                                name: { type: string }
                                position: { type: string }
                        user:
                            type: "object"
                        approver:
                            type: "object"
                            properties:
                                date: { boost: 5 }
                        lastlogin: { type: date, format: basic_date_time }
                        birthday: { type: date, format: "yyyy-MM-dd" }
                        dynamic_allowed: { type: object, dynamic: true }
                    _parent:
                        type: "parent"
                        property: "parent"
                        identifier: "id"
                null_mappings:
                    mappings: ~
        empty_index: ~
