curl -XPOST 'http://localhost:9200/sy4' -d '{
"analysis": {
"analyzer":{
"mysynonym":{
"type": "custom",
"tokenizer":"ik_max_word",
"filter":[
"remote_synonym"
]
}
},
"filter":{
"remote_synonym":{
"expand": true,
"ignore_case": true,
"type": "dynamic_synonym",
"synonyms_path" : "http://ip:port/word/getAllSynonymToTokenStream",
"interval": 60
}
}
}
}'
附上jar,网上下载的有bug
附件:http://down.51cto.com/data/2366580
本文转自whk66668888 51CTO博客,原文链接:http://blog.51cto.com/12597095/1916129