2017-08-22 5 views
1

coveo検索用の索引付けからsitecore項目項目を削除する方法を知りたいと思います。私はそれが可能トラフcoveo.searchprovider.configcoveo検索用の索引付けからsitecore項目フィールドを削除する方法

https://developers.coveo.com/display/public/SitecoreV3/Customizing+the+Indexing+Parametersenter link description here

<exclude hint="list:AddExcludedField"> 
    <fieldId>{8CDC337E-A112-42FB-BBB4-4143751E123F}</fieldId> 
</exclude> 

ことを知っているしかし、私は除外したいインデックスから除外することを示しますどのフィールドレベルでプロパティを作成することにしたいと、そのプロパティのチェックボックスを使用してcoveoインデックスから。

それはブログ https://developers.coveo.com/display/public/SitecoreV3/Excluding+Sitecore+Items+From+Your+Index

答えて

2

以下の説明poosibleトラフパイプラインのだろうはい、着信フィルタは、あなたが探しているものです。

public class ApplyCoveoInboundIndexShouldBeExcludedFieldFilter : AbstractCoveoInboundFilterProcessor 
{ 
    public override void Process(CoveoInboundFilterPipelineArgs args) 
    { 
     if (args.IndexableToIndex != null && !args.IsExcluded && ShouldExecute(args)) { 
      if (ItemShouldBeExcluded(args.IndexableToIndex.Item)) { 
       args.IsExcluded = true;   
      } 
     } 
    } 

    private bool ItemShouldBeExcluded(IItem item) { 
     return item.GetFieldValue("SHOULD_INDEX_ITEM_FIELD_NAME") == "0"; 
    } 
} 

必要に応じてItemShouldBeExcludedの方法を変更します。

関連する問題