Product DocsMenu

Coveo Platform 7.0 >
Administrator Help > Coveo .NET Front-End 12.0 > Integrating a Search Interface in the Sitecore Content Editor

Integrating the Coveo .NET Search in the Sitecore Content Editor

You can integrate the Coveo .NET search interfaces in your Sitecore website to provide a better search experience to your website users (see Integrating the Coveo .NET Search Interface in a Sitecore Website).

You can also integrate the Coveo search in the Sitecore Content Editor so that people contributing to the site content can also take advantage of the Coveo search features and more easily find information in the whole content, not just published content.

Note: The integration described in this topic works with Coveo .NET Front-End 12.0.61+.

Tip: Typically, a Sitecore site is managed with a Master database containing the whole content and a Web database containing only the published content. You can create separate sources for these two databases (see Configuring and Indexing a Sitecore Source), and then assign the Web source to the scope of the search interface integrated in the website, and the Master source to the scope of the search interface integrated in the Content Editor. This way, all of the unpublished content is searchable from the Sitecore Desktop.

To integrate the Coveo search in the Sitecore Content Editor

  1. If not already done, install the Coveo Front-End components on your Sitecore server (see Installing Coveo .NET Front-End).

  2. Install the Coveo Content Search for Sitecore:

    1. Log in to the Sitecore Desktop user interface using an administrative account.

    2. On the Sitecore Desktop, select Sitecore > Development Tools > Installation Wizard.

    3. In the Installation Wizard dialog box:

      1. In the Welcome to the Install Package Wizard screen, click Next.

      2. In the Select Package screen:

        1. Click Upload, and then browse the Coveo Master server to select the Coveo Content Search package distributed with CES: 

          [CES_Install_Path]\Bin\Sitecore6.0CoveoContentSearch2.zip

          Note: Use the Sitecore6.0CoveoContentSearch.zip package only when you use the Sitecore legacy connector (see Sitecore Legacy Connector).

        2. Click Next.

      3. In the Ready to Install screen, click Install.

        Note: If an Access Denied error is displayed for the bin_install folder while installing the package, verify the security permissions for ASP.NET in the bin folder of Sitecore or install the files manually.
    4. Select the Restart the Sitecore client option, and then click Finish.

  3. Using an administrator account, connect to your Sitecore server.

  4. Create the Coveo virtual directory:

    1. Open IIS.

    2. In IIS, locate and right-click the website that corresponds to your Sitecore instance, and then select Add virtual directory.

    3. In the Create Virtual Directory dialog box:

      1. In the Alias box, enter Coveo.

      2. In the Physical path box, enter [.Net_Front-End_Path]\Web\Coveo, typically C:\Program Files\Coveo .NET Front-End 12\Web\Coveo.

    4. Close IIS.

  5. Using a text editor, edit the Sitecore web.config file:

    Example: For an instance named Sitecore, the file is located in the C:\inetpub\wwwroot\Sitecore\WebSite folder.

    1. Copy the following code and paste it just before the </configSections> tag.

      <sectionGroup name="coveoCnlWeb">
        <section name="customContent" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </sectionGroup>
      <sectionGroup name="coveoEnterpriseSearch">
        <section name="database" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <section name="analytics" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <section name="locations" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <section name="server" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </sectionGroup>  
    2. Copy the following code and paste it just before the </controls> tag, a child of the <pages> tag.

      <add tagPrefix="cnla" namespace="Coveo.CNL.Web.Ajax" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cnlb" namespace="Coveo.CNL.Web.BetterControls" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cnlm" namespace="Coveo.CNL.Web.Misc" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cnlv" namespace="Coveo.CNL.Web.Validators" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cnlvs" namespace="Coveo.CNL.Web.Validators.ServerSide" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cnlw" namespace="Coveo.CNL.Web.Widgets" assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" />
      <add tagPrefix="ces" namespace="Coveo.CES.Web.Search.Controls" assembly="Coveo.CES.Web.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add tagPrefix="cs" namespace="Coveo.CES.Web.Search.Controls.CustomerService" assembly="Coveo.CES.Web.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" />  
    3. Copy the following code and paste it just before the </namespace> tag, a child of the <namespaces> tag.

      <add namespace="Coveo.CES.Web.Search"/>
      <add namespace="Coveo.CES.Web.Search.Controls" />
      <add namespace="Coveo.CNL.Web" />  
    4. Copy the following code and paste it just before the </assemblies> tag, a child of the <compilation> tag.

      <add assembly="Coveo.CNL, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add assembly="Coveo.CES.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" />
      <add assembly="Coveo.CNL.Web, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>
      <add assembly="Coveo.CES.Web.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2"/>  
    5. Copy the following code and paste it at the end of the file, just before the </configuration> tag.

      <coveoCnlWeb>
        <customContent uri="~/Coveo/" anonymousUri="~/Coveo/Anonymous/"/>
      </coveoCnlWeb>
      <coveoEnterpriseSearch>
        <server hostname="localhost" port="52800"/>
        <database enabled="false" connectionString="mongodb://localhost/databaseName"/>
        <analytics enabled="false" connectionString="Data Source=yourServerName;Initial Catalog=CoveoAnalytics;Integrated Security=SSPI;"/>
      </coveoEnterpriseSearch>  
    6. Save the file.

  6. When CES and Sitecore are not installed on the same server, copy the index certificate file from the Coveo Master server to the Sitecore server: 

    1. Using an administrator account, connect to the Coveo Master server.

    2. Copy the index certificate file [Index_Path]\Config\Certificates\cert-iis.p12, typically C:\CES7\Config\Certificates\cert-iis.p12.

    3. Paste the certificate file on the Sitecore server into the Sitecore instance website.

      Example: For an instance named Sitecore, the default path is C:\inetpub\wwwroot\Sitecore\Website. You can also rename the certificate file such as ces-certificate.p12.

  7. Configure the connection to the CES index. Using a text editor:

    1. Open the Sitecore instance web.config file.

    2. Under the <coveoEnterpriseSearch> tag, edit the <server> tag to include the following attributes: 

      • hostname=”MyCoveoMasterServerHostName” where you replace MyCoveoMasterServerHostName with the name of your Coveo Master server or localhost when CES and Sitecore are on the same machine.

      • sslCertificatePath=”C:\inetpub\wwwroot\Sitecore\Website\ces-certificate.p12”, ensuring that the path points to your certificate file.

      • port=”52800”, the default CES port number.

      Example: When CES and Sitecore are on the same server.

      <server hostname="localhost" port="52800" servicesHostname="localhost" servicesPort="52810" instance="default" mirrorName="default" sslCertificatePath="C:\Program Files\Coveo .NET Front-End 12\Web\ces-certificate.p12"/>
  8. Configure the Sitecore source used by Coveo search:

    1. Using a text editor, open the CoveoSearch.aspx file.

      Example: For a Sitecore instance named Sitecore, the file is typically located in the C:\inetpub\wwwroot\Sitecore\Website\sitecore\shell\Applications\Coveo\ folder.

    2. Locate the following code:

      /* UNCOMMENT THIS SECTION BEFORE FIRST USE
      p_Args.Builder.AddConstantExpression("@Source=MySourceName");
      */ 

      and replace it with:

      p_Args.Builder.AddConstantExpression("@Source=\”YOUR SITECORE SOURCE NAME HERE\”");

      where you replace YOUR SITECORE SOURCE NAME HERE by the name of the source you created to contain the whole Sitecore content, typically indexing the master database.

    3. Save and close the file.

People who viewed this topic also viewed