-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-laws-with-analyser.txt
59 lines (59 loc) · 1.36 KB
/
template-laws-with-analyser.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
curl -X PUT "localhost:9200/_template/laws_template?pretty" -H 'Content-Type: application/json' -d'
{
"index_patterns": ["laws-*"],
"settings": {
"number_of_shards": 1,
"analysis": {
"filter": {
"french_elision": {
"type": "elision",
"articles_case": true,
"articles": [
"l", "m", "t", "qu", "n", "s",
"j", "d", "c", "jusqu", "quoiqu",
"lorsqu", "puisqu"
]
},
"french_stop": {
"type": "stop",
"stopwords": "_french_"
},
"french_stemmer": {
"type": "stemmer",
"language": "light_french"
}
},
"analyzer": {
"law_text_analyser": {
"type": "custom",
"tokenizer": "standard",
"char_filter": [
"html_strip"
],
"filter": [
"asciifolding",
"french_elision",
"lowercase",
"french_stop",
"french_stemmer"
]
}
}
}
},
"mappings": {
"properties": {
"articleText": {
"type": "text",
"analyzer": "law_text_analyser"
},
"articleTextHTML": {
"type": "text",
"analyzer": "law_text_analyser"
},
"articleId": {
"type": "keyword"
}
}
}
}'