{"action":"reopened","issue":{"url":"https://api.github.com/repos/hankcs/HanLP/issues/944","repository_url":"https://api.github.com/repos/hankcs/HanLP","labels_url":"https://api.github.com/repos/hankcs/HanLP/issues/944/labels{/name}","comments_url":"https://api.github.com/repos/hankcs/HanLP/issues/944/comments","events_url":"https://api.github.com/repos/hankcs/HanLP/issues/944/events","html_url":"https://github.com/hankcs/HanLP/issues/944","id":354992252,"node_id":"MDU6SXNzdWUzNTQ5OTIyNTI=","number":944,"title":"solr中配置hanlp同义词没有预期效果","user":{"login":"panholly","id":38783332,"node_id":"MDQ6VXNlcjM4NzgzMzMy","avatar_url":"https://avatars0.githubusercontent.com/u/38783332?v=4","gravatar_id":"","url":"https://api.github.com/users/panholly","html_url":"https://github.com/panholly","followers_url":"https://api.github.com/users/panholly/followers","following_url":"https://api.github.com/users/panholly/following{/other_user}","gists_url":"https://api.github.com/users/panholly/gists{/gist_id}","starred_url":"https://api.github.com/users/panholly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panholly/subscriptions","organizations_url":"https://api.github.com/users/panholly/orgs","repos_url":"https://api.github.com/users/panholly/repos","events_url":"https://api.github.com/users/panholly/events{/privacy}","received_events_url":"https://api.github.com/users/panholly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-29T04:29:30Z","updated_at":"2018-08-29T11:46:39Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n注意事项和版本号必填，否则不回复。若希望尽快得到回复，请按模板认真填写，谢谢合作。\r\n-->\r\n\r\n## 注意事项\r\n请确认下列注意事项：\r\n\r\n* 我已仔细阅读下列文档，都没有找到答案：\r\n  - [首页文档](https://github.com/hankcs/HanLP)\r\n  - [wiki](https://github.com/hankcs/HanLP/wiki)\r\n  - [常见问题](https://github.com/hankcs/HanLP/wiki/FAQ)\r\n* 我已经通过[Google](https://www.google.com/#newwindow=1&q=HanLP)和[issue区检索功能](https://github.com/hankcs/HanLP/issues)搜索了我的问题，也没有找到答案。\r\n* 我明白开源社区是出于兴趣爱好聚集起来的自由社区，不承担任何责任或义务。我会礼貌发言，向每一个帮助我的人表示感谢。\r\n* [x] 我在此括号内输入x打钩，代表上述事项确认完毕\r\n\r\n## 版本号\r\n<!-- 发行版请注明jar文件名去掉拓展名的部分；GitHub仓库版请注明master还是portable分支 -->\r\n\r\n当前最新版本号是：\r\n我使用的版本是：\r\n\r\n<!--以上属于必填项，以下可自由发挥-->\r\n\r\n## 我的问题\r\n\r\nsolr中使用自定义同义词词库，多个同义词时返回不完整\r\n\r\n## 复现问题\r\n\r\n我的同义词词典synonyms_department.txt, 每一行的内容如下：\r\n\r\n`肾内科,肾脏科,肾病内科,肾病科,肾脏内科,肾内`\r\n\r\n定义一个hanlp分词的type:\r\n```\r\n     <fieldType name=\"hanlp_syn_department\" class=\"solr.TextField\" positionIncrementGap=\"100\">\r\n          <analyzer type=\"index\">\r\n               <tokenizer class=\"com.hankcs.lucene.HanLPTokenizerFactory\" enableIndexMode=\"true\" enableNameRecognize=\"true\" enableOrganizationRecognize=\"true\"/>\r\n               <filter class=\"solr.SynonymFilterFactory\" synonyms=\"synonyms_department.txt\" ignoreCase=\"true\" expand=\"false\" />\r\n          </analyzer>\r\n          <analyzer type=\"query\">\r\n              <!-- 切记不要在query中开启index模式 -->     \r\n              <tokenizer class=\"com.hankcs.lucene.HanLPTokenizerFactory\" enableIndexMode=\"false\" enableNameRecognize=\"true\" enableOrganizationRecognize=\"true\"/>\r\n          </analyzer>              \r\n     </fieldType>\r\n```\r\n使用hanlp_syn_department类型的字段做analysis：\r\n![screen shot 2018-08-29 at 1 05 08 pm](https://user-images.githubusercontent.com/38783332/44766503-479c5900-ab8c-11e8-8d6c-bfc22b62e21a.png)\r\n\r\n\r\n相同的同义词词典，在ik中的效果：\r\n![screen shot 2018-08-29 at 12 25 31 pm](https://user-images.githubusercontent.com/38783332/44765325-c4c4cf80-ab86-11e8-853a-718b20f8bab1.png)\r\n\r\n\r\n其他issues关于同义词的配置也翻了还是没有找到原因，请指教问题出在哪里. "}}
{"actor":{"display_login":"panholly"}}