Revert "Bug 20073: Remove perlcritic error"
[koha.git] / etc / searchengine / elasticsearch / index_config.yaml
1 ---
2 # Index configuration that defines how different analyzers work.
3 index:
4   analysis:
5     analyzer:
6       # Phrase analyzer is used for phrases (phrase match, sorting)
7       analyser_phrase:
8         tokenizer: keyword
9         filter:
10           - icu_folding
11         char_filter:
12           - punctuation
13       analyser_standard:
14         tokenizer: icu_tokenizer
15         filter:
16           - icu_folding
17       analyser_stdno:
18         tokenizer: whitespace
19         filter:
20           - icu_folding
21         char_filter:
22           - punctuation
23     normalizer:
24       normalizer_keyword:
25         type: custom
26         filter:
27           - icu_folding
28     char_filter:
29       # The punctuation filter is used to remove any punctuation chars in fields that don't use icu_tokenizer.
30       punctuation:
31         type: pattern_replace
32         # The pattern contains all ASCII punctuation characters.
33         pattern: '([\x00-\x1F,\x21-\x2F,\x3A-\x40,\x5B-\x60,\x7B-\x89,\x8B,\x8D,\x8F,\x90-\x99,\x9B,\x9D,\xA0-\xBF,\xD7,\xF7])'
34         replacement: ''