Use the IasCrawler.createCrawl() method to create a new crawl of any type (for example, file system, delimited file, or custom data source).
IasCrawler.createCrawl(CrawlConfig crawlConfig)
The crawlConfig parameter is a CrawlConfig object that has the configuration settings of the crawl.
To create a new crawl:
To catch these exceptions, use a try block when you issue the method.
If the new crawl is successfully created, it can be started with the IasCrawler.startCrawl() method.