Hi Sandeep
Reflection is your friend, the IndexTab user control contains the various buttons and code to invoke the index rebuild.
Below are some methods extracted from the user control code behind
protected void ProcessRebuildButtonEvent(bool rebuild)
{
this._SearchManager = new SearchManager(AppContext.Current.ApplicationName);
if (rebuild)
{
this.ProgressControl1.StartOperation(new ThreadStart(this.StartIndexRebuild));
return;
}
this.ProgressControl1.StartOperation(new ThreadStart(this.StartIndexIncrementalBuild));
}
private void StartIndexRebuild()
{
try
{
string arg_05_0 = string.Empty;
this._SearchManager.SearchIndexMessage += new SearchIndexHandler(this._SearchManager_SearchIndexMessage);
this._SearchManager.BuildIndex(true);
}
catch (Exception ex)
{
this.ProgressControl1.AddProgressMessageText(ex.Message, true, -1);
}
}
So basically you need to:
1. Create a new instance of the MediaChase.Search.SearchManager
2. Call BuildIndex telling it to rebuild.
:)
Lee
HI
Can anyone point me to the code which rebuilds the commerce catalog search index. I am basically using the Catalog DTO to add data - but want to reindex the catalog once it is done. I am aware that the Quartz service does incremental updates to the index , but I would like to rebuild the full index in my code itself.
Would also be helpful to know how to configure the quartz service to do full rebuild of index at a specific time.
Your input is much appreciated.
Kind Regards
Sandeep