Creating background indexes

By creating a background index, you can remove inconsistencies from your Search index without the need for downtime while the index is rebuilt. Background indexing involves three phases: crawling, file content extraction, and index creation.

You can run a sequence of SearchService admin commands for each phase of background indexing. The SearchService.startBackgroundCrawl command performs a background crawl of the Search seedlists, while the SearchService.startBackgroundFileContentExtraction command acts on up-to-date seedlists and extracts file content outside of the indexing process. The SearchService.startBackgroundIndex command creates a stand-alone index in a location that you specify.

You are not required to run SearchService.startBackgroundCrawl and SearchService.startBackgroundFileContentExtraction before running SearchService.startBackgroundIndex, however, you can do this if you want more control over each phase of the indexing process. If you run SearchService.startBackgroundIndex without executing SearchService.startBackgroundCrawl or SearchService.startBackgroundFileContentExtraction first, the SearchService.startBackgroundIndex command performs the same work as if you had executed the other commands beforehand.

Similarly, if you run SearchService.startBackgroundFileContentExtraction without executing SearchService.startBackgroundCrawl first, the SearchService.startBackgroundFileContentExtraction command performs the same work as if you had executed the SearchService.startBackgroundCrawl command beforehand.