fix #1108 add vietnamese analyzer

This commit is contained in:
Shinsuke Sugaya 2017-06-17 07:34:42 +09:00
parent f805976faa
commit f0d3c6f40e
3 changed files with 22 additions and 4 deletions

View file

@ -15,12 +15,12 @@
<mkdir dir="${plugins.dir}" />
<!-- analysis-fess -->
<antcall target="install.plugin">
<param name="repo.url" value="${maven.release.repo.url}" />
<param name="repo.url" value="${maven.snapshot.repo.url}" />
<param name="plugin.groupId" value="org/codelibs" />
<param name="plugin.name.prefix" value="elasticsearch-" />
<param name="plugin.name" value="analysis-fess" />
<param name="plugin.version" value="5.4.1" />
<param name="plugin.zip.version" value="5.4.1" />
<param name="plugin.version" value="5.4.2-SNAPSHOT" />
<param name="plugin.zip.version" value="5.4.2-20170616.220752-1" />
</antcall>
<!-- analysis-ja -->
<antcall target="install.plugin">

View file

@ -487,6 +487,10 @@
"type": "stemmer",
"language": "turkish"
},
"vietnamese_stop": {
"type": "stop",
"stopwords": ["bị", "bởi", "cả", "các", "cái", "cần", "càng", "chỉ", "chiếc", "cho", "chứ", "chưa", "chuyện", "có", "có thể", "cứ", "của", "cùng", "cũng", "đã", "đang", "đây", "để", "đến nỗi", "đều", "điều", "do", "đó", "được", "dưới", "gì", "khi", "không", "là", "lại", "lên", "lúc", "mà", "mỗi", "một cách", "này", "nên", "nếu", "ngay", "nhiều", "như", "nhưng", "những", "nơi", "nữa", "phải", "qua", "ra", "rằng", "rằng", "rất", "rất", "rồi", "sau", "sẽ", "so", "sự", "tại", "theo", "thì", "trên", "trước", "từ", "từng", "và", "vẫn", "vào", "vậy", "vì", "việc", "với", "vừa"]
},
"truncate10_filter" : {
"type" : "truncate",
"length" : 10
@ -520,6 +524,11 @@
"pos_tagging": false,
"user_dict_path": "${fess.dictionary.path}ko/seunjeon.txt"
},
"vietnamese_tokenizer": {
"type": "fess_vietnamese_tokenizer",
"sentence_detector": false,
"ambiguities_resolved": false
},
"unigram_synonym_tokenizer": {
"type": "ngram_synonym",
"n": "1",
@ -910,6 +919,15 @@
"turkish_stemmer"
]
},
"vietnamese_analyzer": {
"type": "custom",
"tokenizer": "vietnamese_tokenizer",
"filter": [
"truncate20_filter",
"lowercase",
"vietnamese_stop"
]
},
"standard_analyzer": {
"type": "custom",
"char_filter": [

View file

@ -462,7 +462,7 @@
"match": "*_vi",
"mapping": {
"type": "text",
"analyzer": "empty_analyzer"
"analyzer": "vietnamese_analyzer"
}
}
},