0

I am using Sitecore 8.2 with Coveo 4.0.

I'm working on a multisite solution with two sites and created two crawlers inside a single index.

How can I make sure that on the search page data comes from the correct crawler of every site?

1

You can filter the results based on Site name. The below example

Coveo.$('#search').on("buildingQuery", 
    function(e, args) {
        args.queryBuilder.constantExpression.add("<%= ToCoveoFieldName("site") %> = '<%=Sitecore.Context.Site.Name%>'");
    })
    .coveoForSitecore('init', CoveoForSitecore.componentsOptions);

you can visit the below Coveo forums on this query.

https://answers.coveo.com/questions/4937/setting-up-indexes-for-multi-site-sitecore-solutio.html

  • Thanks a lot for your response. It a valuable thing for me. – arun tiwari Aug 14 '19 at 14:19
3

The alternative is to use Coveo filter expression rules if you have a pro license of Coveo. Coveo provides filter expression based on rule engine, where you can define the rule of child item of your website root or can compare the specific field value such as site field. you need to add expression rule on your Coveo search interface item - enter image description here enter image description here

  • Thanks a lot brother, as always you rock. – arun tiwari Aug 14 '19 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.