Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成语义索引库能否热加载? #36

Closed
timlincool opened this issue Aug 16, 2018 · 3 comments
Closed

生成语义索引库能否热加载? #36

timlincool opened this issue Aug 16, 2018 · 3 comments

Comments

@timlincool
Copy link

请问生成语义索引库能否热加载? 打算做增量索引。

我尝试将新增的数据根据使用范例

python solr_script/make_json.py solr_script/sample_docs faq/schema_format faq/faq_json
awk -F "\t" '{print ++ind"\t"$0}' faq/faq_json > faq/faq_json.index
./annoy_index_build_tool example/conf/ example/conf/analysis.conf faq/faq_json.index 128 10 semantic.annoy 1>std 2>err
\cp -rf faq/faq_json.index semantic.annoy example/conf

生成faq_json.index与semantic.annoy文件后,直接覆盖。
发现新的索引并没有生效,是不是我使用的方式错误?

@zhanghan1992
Copy link
Collaborator

目前只有哈希类型的字典支持热加载,语义索引还不支持热加载。

@timlincool
Copy link
Author

请问语义索引日后有支持热加载的计划吗? 或是如果要自己扩展的话,应该要注意些什么?

@yinweichong
Copy link
Collaborator

@timlincool 有计划支持语义索引热加载,不过当前排期未定。自己扩展的话,需要在dict模块中实现annoy加载,调用的时候通过dual_dict_wrapper调用,可以参考manual retrieval作为示例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants