---
# Index configuration that defines how different analyzers work.
index:
  analysis:
    analyzer:
      # Phrase analyzer is used for phrases (phrase match, sorting)
      analyser_phrase:
        tokenizer: keyword
        filter:
          - french_elision
          - french_stop
          - french_stemmer
          - icu_folding
        char_filter:
          - punctuation
      analyser_standard:
        tokenizer: icu_tokenizer
        filter:
          - french_elision
          - french_stop
          - french_stemmer
          - icu_folding
      analyser_stdno:
        tokenizer: whitespace
        filter:
          - icu_folding
        char_filter:
          - punctuation
    normalizer:
      normalizer_keyword:
        type: custom
        filter:
          - french_elision
          - icu_folding
      my_normalizer:
        type: custom
        char_filter: icu_normalizer
    char_filter:
      # The punctuation filter is used to remove any punctuation chars in fields that don't use icu_tokenizer.
      punctuation:
        type: pattern_replace
        # The pattern contains all ASCII punctuation characters apart from apostrophe (\x27) since it's needed
        # for the elision filter (char_filter always runs before other filters).
        pattern: '([\x00-\x1F,\x21-\x26,\x28-\x2F,\x3A-\x40,\x5B-\x60,\x7B-\x89,\x8B,\x8D,\x8F,\x90-\x99,\x9B,\x9D,\xA0-\xBF,\xD7,\xF7])'
        replacement: ''
    filter: 
      french_elision:
        type: elision
        articles:
          - 'c'
          - 'd'
          - 'j'
          - 'l'
          - 'm'
          - 'n'
          - 'qu'
          - 's'
          - 't'
          - 'jusqu'
          - 'lorsqu'
          - 'puisqu'
          - 'quoiqu'
      french_stop:
        type: stop
        stopwords: '_french_'
      french_stemmer:
        type: stemmer
        language: light_french
