How to trigger Solr Crawls via the Ektron API

  • Updated

This article discusses the Ektron internal API that can trigger a crawl.  Some developers are looking for a programmatic way to do this so this article demonstrates this.  However this API is not intended as a publicly supported framework API as found here

There are two method for incremental crawl and full crawl. These methods are used by the workarea under node status. These are not documented nor tested in a manner for active use, meaning not fully tested outside of the scope of the workarea.

Incremental Crawl:

var crawl = new Ektron.Cms.Search.SolrCrawler();
crawl.StartIncrementalCrawl(false, CrawlType.All, false);
Response.Write("Crawl has started!");


Full Crawl:

var crawl = new Ektron.Cms.Search.SolrCrawler();
crawl.StartFullCrawl(CrawlType.All, false);
Response.Write("Crawl has started!");


Please use caution and test in development environments before implementing this to any live environment.