Subscribe:

Pages

Monday, October 8, 2012

Sitecore Performance degrade with Coveo Search Connector

In My recent project We have used Coveo’s Sitecore connector as search engine for our site. As a part of basic performance tuning I have enabled content expiration headers for the site. When I had inspected the site using firebug to cross check whether content expiration headers were set properly or not, I have found that Coveo is rendering 2 Javascript and 1CSS files which doesn’t have content expiration headers and are taking long time to load. I thought I have to enable content expiration headers on Coveo site as well and did that but there was no luck.
I have tried enabling output cache on Anonymous.aspx but it didn’t work.
After inspecting web.config found a setting

<setting name="DisableBrowserCaching" value="true" />

So as Sitecore by default disabling browser cache and none of the above was working. Workaround for this problem is to tell Sitecore not to process request to Anonymous.aspx, we can do this by adding “/Coveo/Anonymous/” to “IgnoreUrlPrefixes” setting in Sitecore web.config. Also if you are using DMS this will prevent unnecessary tracking of "/Coveo/Anonymous/" pages.

Saturday, October 6, 2012

Sitecore Coveo search connector field mapping

Coveo connector for Sitecore provides a flexible way of indexing the sitecore metadata through mapping file. It is very important to configure the metadata mapping properly for providing desired search results to users. Configuration of Coveo connector and mapping file are well described here. But there are couple of points that we need to know we have to create a custom mapping class to handle complex mappings.

  1. Where to copy the assembly containing the custom class?
    Answer: Program Files\Coveo\Bin
    This is important because Coveo installation folder has couple of bin folders
    • Program Files\Coveo\Bin
    • Program Files\Coveo\Web\Bin
  2. Issue I had was even after copying the assembly to the "Program Files\Coveo\Bin" Coveo was not able to resolve the custom class and I was getting error "Mapping resolver type 'XXX,MyAssembly' doesn't exist" when crawl is started. Problem here was after you copy dll to bin folder you have to restart the Coveo service for it to resolve custom class.