How to implement Solr into Sitecore

前端 未结 2 1850
独厮守ぢ
独厮守ぢ 2021-02-09 00:01

I have to implement Solr index into Sitecore and I would like to know what is the best approach?

I looked at following approaches:

  1. Capture publish end even
2条回答
  •  抹茶落季
    2021-02-09 00:23

    We've done this on a few sites and tend to have a new "published" solr index and "unpublished" index

    We interrupt:

    OnItemSaving

    Event to push things into the unpublished index (you may not need this, it depends if you want things in preview mode)

    OnPublishItemProcessed

    We process additions and updates to the published index here, I'm not sure what we do about deletions here without digging right into the code but certainly deal with deletions on the OnItemDelete (mentioned below)

    OnItemDelete

    We interrupt here to remove things from the published and non-published index (I think we remove from the published index here because Sitecore makes you publish the parent node in order to publish out deletions to the web database)

    I hope that helps, I'd post the code if I could (but I'd be scowled at).

提交回复
热议问题