Coveo Index configuration in Sitecore 8
Hi everyone, I installed Coveo for Sitecore and my local environment is up and running and the master and web coveo indexes has been created by default. Now, I want to do the following configurations
1. Disable the default sitecore web and master indexes. sitecore_web_index, sitecore_master_index. 2. Instead of using the above ones use Coveo_master_Index and Coveo_web_Index 3. Rename the Coveo_master_Index and Coveo_web_Index to something else like XYZ_web_index and XYZ_master_index 4. Do the following configuration:
- XYZ_web_index: -> Index Published Site - XYZ_master_index -> Index used by sitecore editors - Create a new Coveo index for the preview mode of sitecore.
Is the above possible with Coveo? Also Sitecore has other indexes like the core, sitecore_marketing_asset_index_master, sitecore_marketing_asset_index_web, etc.. Can those other indexes can be configured also to use Coveo entirely?
Hi Juan Pablo,
Your post is composed of many questions. I'll try to answer to all of those.
Let me clarify why Coveo is creating separate indexes for the master and web databases in Sitecore 8 instead of replacing the Lucene ones. Coveo's main benefit in Sitecore is to offer a great search experience to visitors of your website. Coveo is not really improving the experience of content editors by replacing the master, web and core Lucene indexes. Coveo for Sitecore on Sitecore 7.X replaces the Lucene master, web and core indexes by Coveo ones because it was a requirement on Sitecore 7.0 and 7.1 that weren't able to run more than one search provider at the same time. In version 8, Sitecore added a lot of new indexes that are unrelated to the visitors searches. Thus, instead of replacing all those new indexes, Coveo decided to focus on improving the visitors search experience. With that objective and performance in mind, we created copies of the web and master indexes to limit the number of queries those indexes would receive. The Coveo indexes receive only visitors queries (and the edit/preview mode queries). The Lucene indexes continue to receive the content editors and Sitecore tools queries. I hope this helps to understand the default architecture.
For your questions, first, I noticed one thing you want to do that cannot be done in Sitecore: Renaming the "sitecore_master_index" to "XYZ_master_index". This is because Sitecore refers to this index name in constants in its own code and/or its configuration files. Thus, you cannot rename the main master index. I know that the web and core indexes can be renamed. I don't know for all the other Sitecore 8 indexes. You'll need to try by yourself.
Secondly, Coveo never tested to replace all the new Sitecore 8 indexes like the "sitecore_marketing_asset_index_master" and "sitecore_marketing_asset_index_web". It may work or not. In fact, Coveo doesn't offer official support to people converting those Lucene indexes to Coveo indexes. It is at your own risk.
For the Sitecore preview mode index you want to create, I don't think it is possible either. Sitecore preview mode always use the master database to load the items from (even if you are editing the web database items from the desktop mode). Coveo UI controls work by looking for the first Coveo index that indexes this context database. In that case it would be the "Coveo_master_index" (or any name you give it). This logic cannot be changed and you cannot specify the index to use for the Coveo UI components.
With all that in mind, I would suggest you to rename the "Coveo_master_index" to "sitecore_master_index" and to rename the "Coveo_web_index" to "sitecore_web_index". The names will then be the same names as the out of the box Lucene indexes defined in the `Sitecore.ContentSearch.*.config` files. Since the `Coveo.SearchProvider.config` file is loaded before the `Sitecore.ContentSearch.*.config` files, the Coveo indexes will be loaded before and will replace the Lucene ones. You will end with just one master and one web index that will be used both by the Sitecore tools and Coveo UI components.
For the core index, you can duplicate the "Coveo_master_index" node to create your configuration of a "sitecore_core_index" and change the "master" references to "core" like this:
<key>$(id)</key> <database>core</database> </propertystore> </index></p><p>I hope this answers all your questions. Don't hesitate to comment if you need clarifications.</p><p>Jeff</p>