Sitecore的Solr的移除指数版本 [英] Sitecore Solr remove versions from index

查看:177
本文介绍了Sitecore的Solr的移除指数版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Sitecore的7和Solr的搜索提供商。我目前拥有的站点设置更新发布项目时,搜索索引。

I’m using Sitecore 7 and the Solr Search provider. I currently have the site setup to update the search index when publishing an item.

我注意到,当笔者CMS创建不同版本的项目,然后提交这些到索引不从索引中删除该项目以前的版本,所以该指数包含相同Sitecore的项目的多个版本。

I’ve noticed that when the CMS author creates different versions of an item and then submits these into the index the previous version of the item is not removed from the index, so the index contains multiple versions of the same Sitecore item.

有谁知道的任何设置,那我可以改变,以确保以前的版本从索引中添加新版本之前删除?

Does anyone know of any settings, that I can change, to make sure that the previous version is removed from the index before adding the new version?

我试着运行一些代码象下面以删除从指数刚刚发布过,但对指数的删除方法项目似乎并没有删除任何东西。

I’ve tried running some code like below to remove the items from the index just before publishing, but the Delete method on the index doesn’t seem to delete anything.

var indexableItem = (SitecoreIndexableItem)item;
ContentSearchManager.GetIndex(index).Delete(indexableItem.UniqueId



任何帮助非常赞赏。

Any help much appreciated.

推荐答案

我接触Sitecore的就这一个,他们纷纷表示,这很可能是一个错误,他们正在调查。

I contacted Sitecore on this one and they have said that this is likely to be a bug and they are investigating.

作为一种变通方法,Sitecore的建议使用入站和出站过滤器来过滤索引中的项目。

As a workaround, Sitecore recommend using the Inbound and Outbound filters to filter items in the index.

下面是更多一些这方面的资料:

Here's some more information on that:

http://www.sitecore.net/Community/Technical-Blogs/Sitecore-7-Development-Team/帖子/ 2013/04 / Sitecore的-7-入站和出站过滤器 - Pipelines.aspx

更新:@Jason在下面的评论中指出这是现在这样的支持修复 - 请参阅知识库文章 - https://kb.sitecore.net/articles / 992608

UPDATE: @Jason in the comments below pointed out that is now a support fix for this - see knowledge base article - https://kb.sitecore.net/articles/992608

这篇关于Sitecore的Solr的移除指数版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆