Reputation: 686
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.
Upvotes: 1
Views: 3005
Reputation: 686
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:
Upvotes: 3
Reputation: 3064
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.
Upvotes: 5