Tagged: Coveo

Coveo for Sitecore: Index Error Troubleshooting and Resolution

Coveo-Sitecore-p_ApiKey-Error-Title-Image.png

I installed Coveo 5.0.1039.1 on the Sitecore 10.1 instance locally. 

After Coveo activation, the indexes weren’t loading and threw an error.

Coveo-Sitecore-p_ApiKey-Error.png

The logs showed ‘The parameter ‘p_ApiKey’ must not be an empty string’ error.

Exception: System.ArgumentException Message: Precondition failed: The parameter 'p_ApiKey' must not be an empty string Parameter name: p_ApiKey Source: Coveo.Framework at Coveo.Framework.CNL.Precondition.RaiseArgumentException(String p_Message, String p_ParameterName) at Coveo.Framework.CNL.Precondition.NotEmpty(String p_Parameter, String p_ParameterName) at Coveo.CloudPlatformClientBase.Communication.CloudPlatformHttpClientFactory.CreateAuthorizedJsonHttpClient(String p_ApiKey) at Coveo.CloudPlatformClientBase.CloudPlatformClient..ctor(CloudPlatformConfiguration p_Configuration, ICloudPlatformHttpClientFactory p_CloudPlatformHttpClientFactory, IPipelineRunnerHandler p_PipelineRunnerHandler, ISerializer p_Serializer, ICoveoSettings p_CoveoSettings, IStaticTTLCacheFactory`2 p_StaticTTLCacheFactory, ICriticalExceptionHandler p_CriticalExceptionHandler) at Coveo.CloudPlatformClientBase.CloudPlatformClient..ctor(CloudPlatformConfiguration p_Configuration) at Coveo.CloudPlatformClientBase.Communication.CloudPlatformClientFactory.GetCloudPlatformClient(CloudPlatformConfiguration p_Configuration) at Coveo.SearchProvider.Licensing.CloudLicenseRetriever.GetCloudLicense() at Coveo.SearchProvider.Licensing.CloudLicenseRetriever.GetLicense(Boolean p_ForceRetrieve) at Coveo.SearchProvider.Licensing.Cloud.LicenseRetriever.GetLicense(Boolean p_ForceRetrieve) at Coveo.SearchProvider.Licensing.LicenseManager.RetrieveLicense(Boolean p_ForceUpdate) at Coveo.SearchProvider.Licensing.LicenseManager.EnsureValidLicense() at Coveo.SearchProvider.Licensing.LicenseManager.GetLicenseInformation() at Coveo.SearchProvider.Rest.SitecoreRestHttpHandler.InitializeLicenseSettings() at Coveo.SearchProvider.Rest.SitecoreRestHttpHandler.OnInitializeSettings() at Coveo.Search.Api.Proxy.ProxyHttpHandler.OnInitialize() at Coveo.Search.Api.Proxy.ProxyHttpHandler.EnsureInitialized() at Coveo.Search.Api.Proxy.ProxyHttpHandler.ProcessRequest(IHttpContext p_Context) at Coveo.SearchProvider.Rest.SitecoreRestHttpHandlerDispatcher.ProcessRequest(HttpContext p_Context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

After researching, came to know there are two API Keys in Coveo.CloudPlatformClient.Custom.config needs to match with Coveo Platform.

1. apiKey
2. searchApiKey

Coveo-Sitecore-p_ApiKey-Error-4.png

When I logged into the platform, the keys were not visible since it was secure (not sure where I saved it!), decided to create new keys.

Coveo-Sitecore-p_ApiKey-Error-2.png
1. SearchApiKey

To create the Search API Key, we must ensure the correct permissions are in place.

Ensure that Impersonate -> Allowed is selected to limit the scope of the API Key, which can be selected from the drop-down list.

Coveo-Sitecore-p_ApiKey-Error-3.png
2. ApiKey

To create the ApiKey, we need to set multiple privileges.

Content Tab:

    1. Fields -> Edit
    2. Security Identities -> Edit
    3. Security Identity Providers -> Edit
    4. Sources -> Edit all

Coveo-Sitecore-p_ApiKey-Error-5.png

Organization Tab:

    1. Organization -> Edit

Coveo-Sitecore-p_ApiKey-Error-6.png

Search Tab:

    1. Search Page -> View all

Coveo-Sitecore-p_ApiKey-Error-6.png

When the keys are created, make sure to save them in a secure place!

Coveo-Sitecore-p_ApiKey-Error-8.png
It is time to update the new config keys. 

Modify the apiKey and secureApiKey values in Coveo.CloudPlatformClient.Custom.config under AppConfig/Include/Coveo folder

Coveo-Sitecore-p_ApiKey-Error-4.png

Let’s reload Coveo Index Manager and no more errors.

Indexes are loaded and rebuilt successfully. Yay!

Coveo-Sitecore-p_ApiKey-Error-9.png

Hope this helps.

Happy Sitecoring!

References:
https://docs.coveo.com/en/2484/coveo-for-sitecore-v5/activate-silently#creating-the-api-keys

2

My 2023 Reflections

2023 has been a great year – I went to India in the Summer and Minneapolis in the Fall to attend three events – MVP Summit, Sitecore DX, and SUGCON- NA (had a lot of learning in organizing!).

Presentations

Blog Posts

Certifications

  • Jan 2023 – Sitecore Content Hub Admin Certification
  • Mar 2023 – Sitecore Content Hub Developer Certification
  • Sep 2023 – Sitecore XM Cloud Certification

Contributions

  • SUGCON- NA Organizer
  • XM Cloud Beta Training and Feedback
  • XM Cloud Alpha Review Exam
  • User Testing Feedback with Sitecore Search 

Co-organized SUG-Pittsburgh Meetups

Co-organized SUG-QueenCity Meetups

YouTube videos published for SUG – Pittsburgh  

Conferences I attended

  • MVP Summit
  • Sitecore DX
  • SUGCON-NA
  • MVP Sitecore Lunches and Webinars
  • All SUG Pittsburgh and Queen City meetups 
  • Many SUG Boston/ Columbus/ Atlantic meetups  

Plans for 2024 :

Learn and contribute:

  • XM Cloud Plus
  • Sitecore CDP and Personalize

Co-organize :

  • Monthly SUG-Pittsburgh meetup
  • Monthly SUG-QueenCity meetup

Present:

  • SUGCON EU/Symposium
  • SUG Meetups

Happy Sitecoring!

0

Integrating Sitecore website with Coveo rapidly


Coveo-Sitecore-Intergration-Website-Source-11.png

In the previous blogs, we saw how to install and configure Coveo, troubleshoot, and diagnostics.

https://madhuanbalagan.com/install-and-configure-coveo-for-sitecore

https://madhuanbalagan.com/coveo-for-sitecore-troubleshooting-and-diagnostics

Now that Coveo is installed and ready to use, Let us add a Sitecore website to our instance of Coveo.

In the Coveo Admin Console, we can see that there is already a Coveo Master, and Web indexes are added by using the Sitecore Package Installation.

In this blog, I am showing an approach without any installation or configuration on the Sitecore Instance. This approach can be used with any non-Sitecore websites as well.

Coveo-Sitecore-Intergration-Website-Source-1-1.png

Let’s add the Sitecore website as a web source of content.

We have lots of options to choose from let us focus on web for now.

Coveo-Sitecore-Intergration-Website-Source-2.png

Here I’m adding my blog as a Source for our demo. 

Coveo-Sitecore-Intergration-Website-Source-3.png

As soon as adding website name, it recognizes and shows the Sitemap URL and recommends adding it for better performance.

Coveo-Sitecore-Intergration-Website-Source-4.png

After adding the Sitemap URL, Coveo has a few configurations like Authentication and Content security.

Coveo-Sitecore-Intergration-Website-Source-6.png

Since the blog is public-facing no security configuration would be needed.

Now add and build the source to populate the index. It might take time depending on the number of pages on the site.

Coveo-Sitecore-Intergration-Website-Source-7.png

When it’s completed it will turn green and show the number of items in the index and the size.

Coveo-Sitecore-Intergration-Website-Source-8.png

Now that the Index is built, let’s navigate to Content Browser to see if our pages show up.

Coveo-Sitecore-Intergration-Website-Source-9.png

Navigate to the content browser and search for a term.

Coveo-Sitecore-Intergration-Website-Source-10.png

Voila! It works! Now you could integrate Coveo search on your site with a preferred approach.

Hope this helps.

Happy Sitecoring!

 

 

0

Coveo for Sitecore: Troubleshooting and Diagnostics

Coveo’s Diagnostics page is super helpful when troubleshooting any Coveo issues. It is listed in the Coveo Search menu in the Sitecore control panel or can be reached directly with the following url –

https://[CMS Site]/sitecore modules/web/coveo/admin/coveodiagnosticpage.aspx

 

Coveo for Sitecore components state

This section shows the status of all services related to Coveo. Here is the healthy state, but when it errors it shows the detailed error message

Healthy Component State

 

Errors in Component State

Coveo-Sitecore-Control-Panel-Diagnostic

 

Coveo for Sitecore version information

It comes in handy for checking Coveo and Sitecore versions and their compatibility.

Current Coveo for Sitecore version: 5.0.1153.1

Current Sitecore version: 10.2.0.6766

Compatibility status: these versions are compatible

 

Coveo for Sitecore organization information

This section is about the Organization and it is usage details.

 

Coveo for Sitecore configuration files

Basically shows all Coveo-related config files that are currently loaded in the system.

 

Coveo for Sitecore published items

It shows if the Coveo-related Sitecore items are published or not, it’s time to publish them 🙂

 

Coveo for Sitecore Indexing test

This section comes into handy when indexing an item or a path, really helpful when an Item has been published but it’s not available in the Coveo index. 

 

 

Coveo for Sitecore log viewer

This section is my favorite – I typically use it on Production environments to view the logs when we don’t have access to the server or without logging into the Production servers. We can quickly view the log and troubleshoot the issues.

 

Indexes List

It shows all the indexes and the IsCoveo flag differentiates the Coveo and Sitecore Indexes.

 

 

Download Diagnostics Package

Another super helpful tool – The download Diagnostics Package button at the top of the page. 

It creates all necessary config and logs files needed to log a Coveo Support ticket.

I hope this helps someone.

Happy Sitecoring!

1

My 2022 Reflections

2022 has been a good year so far – I traveled to India and Chicago for the Sitecore Symposium. Lots of learning and fun!

Presentations:

Blog Posts :

Certifications:   

  • Feb 2022 – Sitecore OrderCloud Certification
  • Apr 2022 – Sitecore 10 System Administrator Certification
  • May 2022 – Sitecore CDP and Personalize Certification

Co-organized SUG-Pittsburgh Meetups :

Co-organized SUG-QueenCity Meetup :

Conferences I attended:

  • Sitecore Symposium
  • Virtual Developer Day
  • MVP Sitecore Lunches
  • All SUG Pittsburgh and Queen City meetups 
  • Many SUG Boston/ Columbus/ Atlantic meetups  

Plans for 2023 :

Learn and contribute:

  • Composable DXP
  • Sitecore Send
  • Sitecore CDP and Personalize

Co-organize :

  • Monthly SUG-Pittsburgh meetup
  • Monthly SUG-QueenCity meetup

Present:

  • Sitecore Virtual Developer Day
  • SUGCON EU/Symposium
  • SUG Meetups

Happy Sitecoring!

1

Install and Configure Coveo for Sitecore

Install and Configure Coveo for Sitecore

I’ll be installing Coveo 5.0 on a Sitecore 10.2 in the following post. Let’s explore –

1. Download

Choose the Coveo package based on the Sitecore version and download the relevant package.

https://docs.coveo.com/en/2274/coveo-for-sitecore-v5/releases-and-downloads 

Coveo-Install-Sitecore-Download

2. Install

Upload and install using the Sitecore Installation Wizard

Coveo-Install-Sitecore-Installation-Wizard

Accept the customer agreement.

 

 

3. Activation

Once the installation is complete, Sitecore will show the following popup.

Let’s explore how to activate Coveo for Sitecore.

Coveo-Install-Sitecore-Activation-Authorization

The login page brings to https://platform.cloud.coveo.com/login

Coveo-Install-Sitecore-Installation-Plarform-Login

I logged in using a Google account for Demo purposes.

 

Coveo-Install-Sitecore-Installation-Wizard-Accept-Customer-Agreement

Coveo-Install-Sitecore-Installation-Plarform-Grant-Access

Coveo-Install-Sitecore-Activation-Authorization-Successful

4. Configure

After authorization is successful, create your Organization with Name and Organization Type.

  • Enterprise Trial
  • Pro Trial

https://www.coveo.com/en/pricing/sitecore-integration

Coveo-Install-Sitecore-Activation-New-Organization

Use the default Indexing options.

Coveo-Install-Sitecore-Activation-New-Organization-Index-Options

 Provide Farm name and Sitecore credentials and click Activate.

Coveo-Install-Sitecore-Activation-New-Organization-Farm-Configuration

Once Activation is completed, Rebuild all Coveo Indexes to finish the setup.

I hope this helps.

Happy Sitecoring!

1