{"action":"created","issue":{"url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/32","repository_url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj","labels_url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/32/comments","events_url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/32/events","html_url":"https://github.com/NLPchina/elasticsearch-analysis-ansj/issues/32","id":177693102,"number":32,"title":"ambiguity词典自定义路径失效，redis发布报错","user":{"login":"rocky-zh","id":1244039,"avatar_url":"https://avatars.githubusercontent.com/u/1244039?v=3","gravatar_id":"","url":"https://api.github.com/users/rocky-zh","html_url":"https://github.com/rocky-zh","followers_url":"https://api.github.com/users/rocky-zh/followers","following_url":"https://api.github.com/users/rocky-zh/following{/other_user}","gists_url":"https://api.github.com/users/rocky-zh/gists{/gist_id}","starred_url":"https://api.github.com/users/rocky-zh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocky-zh/subscriptions","organizations_url":"https://api.github.com/users/rocky-zh/orgs","repos_url":"https://api.github.com/users/rocky-zh/repos","events_url":"https://api.github.com/users/rocky-zh/events{/privacy}","received_events_url":"https://api.github.com/users/rocky-zh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-19T02:08:04Z","updated_at":"2016-09-19T02:10:13Z","closed_at":null,"body":"配置文件如下：\r\n\r\n```yml\r\nambiguity_path: \"/绝对路径/config/ansj/dic/ambiguity.dic\"\r\n```\r\n通过redis-cli发布\r\n\r\n```\r\npublish ansj_term a:c:减肥瘦身-减肥,nr,瘦身,v\r\n```\r\n\r\n错误日志如下：\r\n\r\n```\r\n[2016-09-19 09:13:06,710][ERROR][ansj-redis-msg-file      ] appendAMB exception\r\njava.security.PrivilegedActionException: java.io.FileNotFoundException: ansj/dic/ambiguity.dic (没有那个文件或目录)\r\n       \tat java.security.AccessController.doPrivileged(Native Method)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils.appendFile(FileUtils.java:71)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils.appendAMB(FileUtils.java:58)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.AddTermRedisPubSub.onMessage(AddTermRedisPubSub.java:38)\r\n       \tat redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:113)\r\n       \tat redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)\r\n       \tat redis.clients.jedis.Jedis.subscribe(Jedis.java:1974)\r\n       \tat org.ansj.elasticsearch.index.config.AnsjElasticConfigurator$1.run(AnsjElasticConfigurator.java:93)\r\n       \tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.io.FileNotFoundException: ansj/dic/ambiguity.dic (没有那个文件或目录)\r\n       \tat java.io.FileOutputStream.open(Native Method)\r\n       \tat java.io.FileOutputStream.<init>(FileOutputStream.java:221)\r\n       \tat java.io.FileWriter.<init>(FileWriter.java:107)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils$1.run(FileUtils.java:74)\r\n       \t... 9 more\r\njava.security.PrivilegedActionException: java.io.FileNotFoundException: ansj/dic/ambiguity.dic (没有那个文件或目录)\r\n       \tat java.security.AccessController.doPrivileged(Native Method)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils.appendFile(FileUtils.java:71)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils.appendAMB(FileUtils.java:58)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.AddTermRedisPubSub.onMessage(AddTermRedisPubSub.java:38)\r\n       \tat redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:113)\r\n       \tat redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)\r\n       \tat redis.clients.jedis.Jedis.subscribe(Jedis.java:1974)\r\n       \tat org.ansj.elasticsearch.index.config.AnsjElasticConfigurator$1.run(AnsjElasticConfigurator.java:93)\r\n       \tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.io.FileNotFoundException: ansj/dic/ambiguity.dic (没有那个文件或目录)\r\n       \tat java.io.FileOutputStream.open(Native Method)\r\n       \tat java.io.FileOutputStream.<init>(FileOutputStream.java:221)\r\n       \tat java.io.FileWriter.<init>(FileWriter.java:107)\r\n       \tat org.ansj.elasticsearch.pubsub.redis.FileUtils$1.run(FileUtils.java:74)\r\n       \t... 9 more\r\n```\r\n\r\n之后跟踪FileUtils.java发现\r\n![1](https://cloud.githubusercontent.com/assets/1244039/18621081/d9ed949c-7e50-11e6-9d7f-26914ed5005e.png)\r\n怀疑版本代码升级中将相对路径丢失后引起错误"},"comment":{"url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/comments/247900329","html_url":"https://github.com/NLPchina/elasticsearch-analysis-ansj/issues/32#issuecomment-247900329","issue_url":"https://api.github.com/repos/NLPchina/elasticsearch-analysis-ansj/issues/32","id":247900329,"user":{"login":"shi-yuan","id":8057153,"avatar_url":"https://avatars.githubusercontent.com/u/8057153?v=3","gravatar_id":"","url":"https://api.github.com/users/shi-yuan","html_url":"https://github.com/shi-yuan","followers_url":"https://api.github.com/users/shi-yuan/followers","following_url":"https://api.github.com/users/shi-yuan/following{/other_user}","gists_url":"https://api.github.com/users/shi-yuan/gists{/gist_id}","starred_url":"https://api.github.com/users/shi-yuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shi-yuan/subscriptions","organizations_url":"https://api.github.com/users/shi-yuan/orgs","repos_url":"https://api.github.com/users/shi-yuan/repos","events_url":"https://api.github.com/users/shi-yuan/events{/privacy}","received_events_url":"https://api.github.com/users/shi-yuan/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T02:10:13Z","updated_at":"2016-09-19T02:10:13Z","body":"谢谢！\r\n请问，你用的版本是？"}}
{"actor":{"display_login":"shi-yuan"}}