【问题标题】:Can Sitecore rebuild indexes in the background without wiping the existing index?Sitecore 能否在不擦除现有索引的情况下在后台重建索引?
【发布时间】:2012-07-02 14:00:22
【问题描述】:

每当您在 Sitecore 中重建 Lucene 索引时,现有索引都会在重建之前被擦除。这是不可接受的,因为我们的索引过程需要很长时间(我们将至少 100,000 项索引到自定义产品搜索索引中)。

有谁知道您是否可以在后台通过 Sitecore 重建 Lucene 索引,然后在索引完成后交换索引。

我认为这种方法的一个额外复杂性是在索引重建期间增量更新会发生什么,如果能深入了解它在 Sitecore 中的工作原理,我们将不胜感激。

【问题讨论】:

标签: sitecore lucene.net


【解决方案1】:

Sitecore.ContentSearch.luceneProvider 中有一个类可以解决这个问题,它是“Sitecore.ContentSearch.LuceneProvider.SwitchOnRebuildLuceneIndex”

John West 已经写了一篇关于它以及如何使用它的帖子: http://www.sitecore.net/da-dk/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/05/Sitecore-7-Rebuild-Lucene-Indexes-in-Temporary-Subdirectories.aspx

如果您碰巧使用 Solr,还有一个等效的类: http://www.skillcore.net/sitecore/using-switchonrebuildsolrsearchindex-solr-provider-for-sitecore

希望对你有帮助

【讨论】:

  • 请注意,这适用于 Sitecore 7,但 Sitecore 6.current 似乎不支持这一点。
【解决方案2】:

如何添加与主索引具有相同配置的第二个索引并在这两个索引之间切换上下文?例如。如果需要重建,首先执行重建索引、第二次搜索和切换角色。

【讨论】:

    猜你喜欢
    • 2013-10-16
    • 1970-01-01
    • 2023-01-30
    • 1970-01-01
    • 2010-09-19
    • 1970-01-01
    • 2011-09-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多