Add 1.9.5版本,用户热更新时,用户可配置是否把从远程字典获取的词存入到自己的字典中 #430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
我司现在es用的是2.3.5版本,而支持的ik是1.9.5版本,在实际运用中,结合情况,稍微改动了一下您的源码,让热更新时能把远程字典的词保存到用户自己的字典中(相当于备份),这样做的好处是远程字典服务器采用增量的方式添加词,降低网络间数据传输量的大小,还有就是万一远程字典服务器和es都宕机了,保存在内存中的远程字典的词会丢失,但只要做了这个备份,重启es就能重新正常工作而无需依靠远程字典服务器,且无需人工备份。我工作没几年,可能写的也不是很好,只是临时的想法让我去修改源码,改造适合自己的工具,如有不当之处,麻烦指点一下。期待得到您的回复,希望能在github贡献一点绵薄之力