Gravatar for dmitry@brainjocks.com

Question by Dmitry Harnitski, Oct 8, 2015 5:13 PM

tenant specific indexes for multisite implementation

In our current multi-tenant Sitecore implementation we want to implement indexing as follows:

  • Standard Sitecore indexes for Core, Master and Web stay in Lucene
  • Every site gets its own dedicated Coveo index for site specific products
  • One Cove instance stores all the indexes

We are planning to include only Products data into the Coveo Index to simplify query syntax and to improve indexing performance.

After reading post below we are not sure if that is possible.

Changing root in SearchProvider.config breaks the search api service

Please clarify if we can implement index per site requirement (last answer in referenced post says that is possible). Some sample configuration would be very appreciated. So far we are getting exceptions as soon as we change Root property of crawler. And that is the only known way for us to filter items on tenant level.

If that is not possible in current version, please clarify if you have any ETA fixing that.

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Oct 8, 2015 5:59 PM

Hi Dmitry,

As you read, Coveo for Sitecore default UI controls actually doesn't support customizing the indexes <Root> property. This is because:

  • The UI controls server side code needs access to the the IIndexable object of the index's database root item (/sitecore) through the Sitecore API. When changing an index <Root> property, the Sitecore API returns an exception for that call.
  • The "Coveo Search" UI component chooses the right index to execute the search queries against intelligently. It uses the first Coveo index inside Sitecore that indexes the Sitecore context database.

This is why Coveo for Sitecore default UI components can only work with a single Coveo index indexing the master database and a single Coveo index indexing the web database. You cannot create indexes for multiple parts of the website as it is common with Lucene or Solr.

Instead, we recommend using inbound filtering to limit the amount of items to index and query expressions to filter out unwanted results on the search pages.

Sitecore inbound filters applies to all the Sitecore indexes at the same time (Lucene, Solr and Coveo). Thus, it is not a good idea to use them in a side by side setup like yours.

In the September release of Coveo for Sitecore we introduced a new pipeline to execute inbound filters only for Coveo indexes. The coveoInboundFilterPipeline pipeline (see Understanding the Indexing and Search Pipelines). There are a few examples on how to configure the default processor of the pipeline and how to create new ones at the bottom of the page. You should create one or a few inbound filter processors for that pipeline to restrict what's get indexed.

To scope the search results to a single site products, you can do it in JavaScript with the _path Sitecore field and the ID of the products repository item (see Adding Filter and Boost Expressions Programmatically and Slow Queries in a Coveo Search Page). You can also do it in the "Coveo Search" component properties dialog if you have the Enterprise edition of Coveo for Sitecore with the "where the item is the specific item or one of its subitems" filtering rule (see Using Boosting/Filtering Rules on the Search component).

Is is not planned to support multiple indexes per Sitecore database in Coveo for Sitecore due to the complexity of the UI components intelligence at the moment. We tried to add support for that a few months ago and we found major issues in the automatic way the fields, source names and security provider names are chosen in the UI components.

I hope this answer helps you to understand the possibilities to address your use case.

Thanks,

Jeff

Ask a question