Gravatar for jrioux@fondsftq.com

Question by jprioux, Aug 22, 2018 3:13 PM

Coveo for sitecore - Is it possible to add a new index

Is it possible to add an index. I am already using the 2 default ones. (Web and Master)

What i would need to add in the configuration file to have a new index named Coveo_webpublic_index

I already have a Coveo.SearchProvider.Custom.config like this :

    <contentSearch>
      <configuration>
        <indexes>
          <index id="Coveo_web_index">
            <locations>
              <crawler name="ContentCrawler">
                <database>web</database>
              </crawler>
              <crawler name="MediaLibraryCrawler">
                <database>web</database>
                <root>/sitecore/media library</root>
              </crawler>
            </locations>
          </index>
          <index id="Coveo_master_index">
            <locations>
              <crawler name="ContentCrawler">
                <database>master</database>
              </crawler>
              <crawler name="MediaLibraryCrawler">
                <database>master</database>
                <root>/sitecore/media library</root>
              </crawler>
            </locations>
          </index>
        </indexes>
      </configuration>
    </contentSearch>

Thanks for the help

2 Replies
Gravatar for flguillemette@coveo.com

Answer by François Lachance-Guillemette, Aug 22, 2018 3:21 PM

Yes, you can.

Copy one of the existing nodes and ensure that your crawlers and strategies point to the right database (I think it would be `webpublic` in your case).

This link goes through the detailed steps to do after you have followed Sitecore's scaling guide:

Prepare the Sitecore Content Manager for a Scaled Environment

In summary:

  1. Copy an existing index node from `Coveo.SearchProvider.config` into `Coveo.SearchProvider.Custom.config`
  2. Change the references to `pub` instead of `web/master` in both strategies and crawlers
  3. Rebuild your index

I would suggest that you configure the Farm Name if you have not already done so, this will ensure that all your scaled Sitecore instances are using the same indexes.

Gravatar for hsantos@coveo.com

Answer by Hugo Santos, Aug 22, 2018 3:15 PM

You can go ahead and simply create another node on the same Coveo.SearchProvider.Custom.config file.

Ask a question