Updating Your Search Indexes

This article explains how to rebuild a search index in Sitecore. For an overview of the indexing process, refer to the Coveo for Sitecore Indexing Guide.

Rebuilding a Search Index Manually

This method re-indexes all the items of the content tree for the Sitecore database(s) that you select. Every single item is re-indexed, regardless of whether it was changed, so this operation can be time-consuming.

Use this method when:

  • You have just installed Coveo for Sitecore, as your search indexes are empty at this point.
  • You need to re-process all items of your content tree. This could be the case if you configured a Computed Field or an Inbound Filter.

To re-index your entire Sitecore content tree

  1. Navigate to the Indexes section of the Command Center at [Your Sitecore Instance]/coveo/command-center/index.html#indexes/.
  2. Rebuild the Coveo indexes for both Sitecore databases or only one of the two indexes.

    • To rebuild both the Coveo_master_index and the Coveo_web_index

      Click the Rebuild All button near the top-right corner of the screen.

    • To rebuild only one of the two Coveo indexes

      1. Click on the Coveo_master_index or the Coveo_web_index row to expand its index details section.

      2. Click the Rebuild button near the bottom-left of the page.

  3. Follow the rebuild progress.

  4. An index is done rebuilding when its status returns to Idle.

    You can hover your mouse over the index progress bar for details regarding each indexing phase. For instance, you can hover over a skipped phase for an explanation in this regard.

    Rebuilding a search index can take a while to complete and depends on the number of items in the associated database.

Refreshing a Crawler

Coveo for Sitecore 5 (April 2019)

A Crawler refresh re-indexes only the crawler Root item and all its sub-items. Additionally, a refresh does not include a DocumentsValidation step, as does a rebuild operation. A refresh is therefore significantly less resource-intensive than a rebuild.

You can access the crawler Refresh buttons in the Indexes section of the Command Center by expanding the index row.

Coveo for Sitecore default crawler configurations are defined in the Coveo.SearchProvider.config file and you can patch these configurations in Coveo.SearchProvider.Custom.config (see Changing the Crawling Root of an Index).

Re-Indexing a Section of Your Content Tree in the Content Editor

This method will re-index only one item of your Content Tree, and its descendants. Only modified items will be re-indexed, so this method is quite fast.

Use this method when you only need to re-index a section of your Content Tree. This is especially useful for development and testing/debugging purposes.

Steps

  1. Log into the Sitecore Desktop.
  2. In the lower-right corner, select the database for which you want to re-index an item. By default, the master database is selected.

  3. Open the Content Editor (Sitecore Start Menu > Content Editor).
  4. In the left-hand side panel (Content Tree), select the item that you want to re-index.

  5. Under the Developer tab, choose Re-Index Tree.

    To display the Developer tab, right-click on the menu toolbar and select Developer.

  6. Wait for the following dialog to complete.

Rebuilding a Search Index Programmatically

Refreshing or rebuilding indexes can be resource-intensive for a Sitecore instance. Before building an automation method, ensure you fully understand the Coveo for Sitecore Indexing Strategies.

Coveo for Sitecore offers a RESTful indexing API which can be used to rebuild indexes. You can try it on the SWAGGER endpoint by navigating to http://[SITECORE INSTANCE_NAME]/coveo/api/index/docs/index#!/Indexes/IndexesV1_Rebuild