Gravatar for nimishmis@yahoo.co.in

Question by nimishmis, Oct 26, 2015 11:17 AM

Coveo setup for Multisite instances

Hi All,

Please guide me how to setup coveo for multi site instances.I have 6 sites running in my application.I need to setup for coveo.

Regards, Nagasekhar

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Oct 26, 2015 11:51 PM

Hi,

Thank you for your question. To give you a personalized answer, we would need to know more about your setup.

  1. You said to have 6 sites in your application. It is really 6 sites in the same Sitecore instance or 6 different Sitecore instances?
  2. Does your sites share some items?
  3. Which release of Coveo for Sitecore are you currently using? (Complete name of the zip package file please)
  4. What did you try to setup Coveo for Sitecore in a multi-site environment yet and which issues did you face?

Thank you,

Jeff

Gravatar for nimishmis@yahoo.co.in

Comment by nimishmis, Oct 27, 2015 1:20 AM

Hi Jeff,

Thanks for your response.

Below are my answers for your questions.

You said to have 6 sites in your application. It is really 6 sites in the same Sitecore instance or 6 different Sitecore instances?

Answer:Single instance.Each individual site has its own Home node

Does your sites share some items? Yes.Only Data templates and other global items

Which release of Coveo for Sitecore are you currently using? (Complete name of the zip package file please)

Coveo for Sitecore 75 3.0 (1000).zip

Coveo Search API 8.0.492 What did you try to setup Coveo for Sitecore in a multi-site environment yet and which issues did you face?

We need search for all sites individually.

I hope i provided sll information.Please help me

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Oct 27, 2015 9:40 PM

Hi Nagasekhar,

Thank you for the answers to my questions. I forgot one question: Are you using the Enterprise, Pro or Free edition of Coveo for Sitecore?

In either case, you will need to create an item in each of your sites that will be the search page of each site. Each of those items will need Coveo for Sitecore search components in their presentation details. Basic stuff here.

If using the Enterprise edition, it is really simple. Just add a "where the item is the specific item or one of its subitems" filtering rule with the help of the rule editor in the search component properties dialog. You will configure the "specific" item to be the "home" item of each individual site. So you will configure each search page to only show the items of its site. (see Using Boosting/Filtering Rules on the Search component)

If you are not using the Enterprise edition, you will have to do that filtering in JavaScript. You will first have to duplicate the default "Coveo Search" component and its ascx/cshtml file if its not already done in your implementation because modifying the default components is not recommanded to avoid upgrade problems later on. Then, in your copy of the ascx or cshtml file of your search component, you would add code behind that is able to get the Short ID of the home page of the current site. Then you will create an advanced query expression to filter the results to only the ones under your home item id by using the Sitecore "_path" field, the == field query operator and the short ID of your home item as the value enclosed with double quotes. (see Adding Filter and Boost Expressions Programmatically).

I explained it at a high level but this should be enough for you to understand and implement the described solution.

Have a great day,

Jeff

Gravatar for nimishmis@yahoo.co.in

Comment by nimishmis, Oct 28, 2015 4:10 AM

Hi Jeff,

Thanks for oyur reply.I understiid what you said,My question is do i need to main indexes for each site.If yes how to set indexes for individual sites.

Thanks, Nagasekhar

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Oct 29, 2015 12:53 AM

You just need one Sitecore index for all your sites. You will be filtering the results at query time. That's the beauty of a unified index. Coveo for Sitecore is already configured with one index per Sitecore database by default so you don't have anything to change in that area. Just follow my recommendations on query filtering for your sites and you'll be good.

Ask a question