如何在 solr 中重新创建索引?
我阅读了 wiki,看起来这将完成在 solr 中重新创建索引的工作
rake sunspot:reindex
,但是我不确定此 rake 任务是否意味着仅在索引字段发生更改时才更新索引。
我正在寻找一种在索引数据引起的索引增量更新后“重新组织”索引的方法。
这篇文章基本上描述了我想要避免的事情。
http://blogs.7digital。 com/dev/2010/07/07/commit-strategies-for-incremental-solr-updates/
经过多次增量更新后,索引的性能会降级。我想经常运行一个任务(rake 任务)来重新构建索引以消除更新后的性能下降。
I read the wiki and it looks like that this will do the job of recreating the index in solr
rake sunspot:reindex
However I am not sure whether this rake task is meant to update the index only when there are changes to the indexed fields.
I am looking for a way to 're-organize' the indices after incremental updates to the index caused by indexing data.
This article basically describes what I want to avoid.
http://blogs.7digital.com/dev/2010/07/07/commit-strategies-for-incremental-solr-updates/
After many incremental update, the performance of the index will degrade. I want to run a task (rake task) every so often that will re build the index to eradicate the performance degradation after updates.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
rake sunspot:reindex 会将 Sunspot 挂钩的每个模型重新索引
到可搜索的模型中,并通过增量更新在保存时更新它们。
rake sunspot:reindex
听起来像是您想要进行完整的重新索引。rake sunspot:reindex will re-index every model
Sunspot hooks into models that are searchable, and will update them on-save with incremental updates.
rake sunspot:reindex
sounds like it's what you want to do a full re-index.