1

This question was previously asked with the qualifier of Sitecore 6.x.

Since Sitecore 7.0 is out and widely used my team and I are in need of a new answer and debate to this question.

What would be the best way I can rebuild a custom index in Sitecore 7.0 Content Delivery?

Edit: (More Info) I do not have access to the code being developed. I run about 320 different websites across multiple Sitecore Instances most sites have their own Lucene Indexes.

Community
  • 1
  • 1
Andrew Quaschnick
  • 686
  • 13
  • 26
  • 1
    You should still be able to selectively deploy from Rebuild Index script from the support toolbox. Make sure access to it is restricted. Or rebuild indexes on Publish, depends on your needs. – jammykam Jan 13 '14 at 22:45
  • @jammykam I would prefer not to use the Sitecore Support Toolbox since it is not updated for Sitecore 7.0. Nor would I be able to convince my bosses that it is safe since it is not labeled as compatible with Sitecore 7.0. – Andrew Quaschnick Jan 13 '14 at 22:58

2 Answers2

5

Not sure if this is what you are looking for but we wrote a class that gets called by task agent. The class itself simply looks for the specified index and rebuilds it.

Sitecore.Search.SearchManager.GetIndex("custom_index").Rebuild()

You could also call it in publishing pipeline if you like to rebuild your custom indexes on publish event.

xoail
  • 2,978
  • 5
  • 36
  • 70
  • This is a great answer if I had access to the code being developed. I am currently the administrator of over 320 websites in our Sitecore instances. I was hoping for a tool or ability to do that without code. I would throw this into the code if I was the developer. – Andrew Quaschnick Jan 13 '14 at 23:24
  • Did you try using Support Toolbox with Sitecore 7? I think it works just fine. – xoail Jan 13 '14 at 23:27
  • The other admins and myself would have to agree that it would work. I doubt that I could convince them of that because it is not labeled as compatible. – Andrew Quaschnick Jan 13 '14 at 23:32
  • 3
    Well, reach out to the developers of Support Toolbox and ask them to label accordingly :) – xoail Jan 13 '14 at 23:33
  • This is the exact same code in the Support Toolbox: `var index = SearchManager.GetIndex(NewIndexesDropList.SelectedValue); if (index != null) index.Rebuild();`, but as you say, Sitecore is only an email away :) – jammykam Jan 14 '14 at 03:20
3

We went with integrating Remote Rebuild Strategy in our Content Delivery servers. It is working like a charm.

Here are two good sources on that Strategy:

  1. http://sdn.sitecore.net/upload/sitecore7/70/sitecore_search_and_indexing_guide_sc70-a4.pdf
  2. http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/04/Sitecore-7-Index-Update-Strategies.aspx
Andrew Quaschnick
  • 686
  • 13
  • 26