Where is the sitecore_horizon_index

Created: 6 Jul 2021, last update: 30 Jan 2022

Where is the sitecore_horizon_index

One of the new things in Horizon for Sitecore 10.1 is the search. But where is the index?

While trying to install Sitecore Horizon 10.1.0 on Sitecore 10.1 update-1 I first make a mistake with the solrCorePrefix variable. the Horizon search didn't work.
By default the $solCorePrefix in the PowerShell script is $sitecoreCmInstanceName
But in my case just a local developer on prem installed with SIF the instance name is "sc1011.sc" and the prefix should be "sc1011"

This works:

param (
  [string]$horizonInstanceName = "horizon.sc1011.sc",
  [string]$horizonPhysicalPath = "C:\inetpub\wwwroot\$horizonInstanceName",
  [string]$horizonAppUrl = "https://$horizonInstanceName",
  [string]$sitecoreCmInstanceName = "sc1011.sc",
  [string]$sitecoreAdminPassword = "b",
  [string]$sitecoreCmInstanceUrl = "https://$sitecoreCmInstanceName",
  [string]$sitecoreCmInstanceInternalUrl = $sitecoreCmInstanceUrl,
  [string]$sitecoreCmInstancePath = "C:\inetpub\wwwroot\$sitecoreCmInstanceName",
  [string]$identityServerPoolName = "sc1011.identityserver",
  [string]$identityServerUrl = "https://$identityServerPoolName",
  [string]$identityServerPhysicalPath = "C:\inetpub\wwwroot\$identityServerPoolName",
  [string]$solrCorePrefix = "sc1011",
  [string]$licensePath ="C:\Sitecore\license.xml",
  [ValidateSet("XP", "XM")]
  [string]$topology = "XP"
Import-Module "$PSScriptRoot\InstallerModules.psm1" -Force
InstallHorizonHost -horizonInstanceName $horizonInstanceName `
  -sitecoreInstanceUrl $sitecoreCmInstanceUrl `
  -sitecoreInstanceInternalUrl $sitecoreCmInstanceInternalUrl `
  -sitecoreAdminPassword $sitecoreAdminPassword `
  -licensePath $licensePath `
  -sitecoreInstansePath $sitecoreCmInstancePath `
  -identityServerPoolName $identityServerPoolName `
  -horizonPhysicalPath $horizonPhysicalPath `
  -identityServerUrl $identityServerUrl `
  -identityServerPhysicalPath $identityServerPhysicalPath `
  -solrCorePrefix $solrCorePrefix `
  -horizonAppUrl $horizonAppUrl `
  -enableContentHub $enableContentHub `
  -enableSXA $enableSXA `
  -topology $topology

So if your search in Horizon is not working check on your Sitecore CM instance the \App_Config\Modules\Horizon\Search\Sitecore.Horizon.Search.Solr.Index there you find the <param desc="core">sc1011_master_index</param> the sc1011 is the $solrCorePrefix in the PowerShell script.

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
  <sitecore role:require="Standalone or ContentManagement" search:require="solr">
      <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
        <indexes hint="list:AddIndex">
          <index id="sitecore_horizon_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="name">$(id)</param>
            <param desc="core">sc1011_master_index</param>
            <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
            <configuration ref="contentSearch/indexConfigurations/horizonDefaultSolrIndexConfiguration" />
            <strategies hint="list:AddStrategy">
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncMaster" role:require="Standalone or (ContentManagement and Indexing)" />
            <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">

So looks like the Horizon search is using the Sitecore master index. But the installation is appointed to the sitecore_horizon_index you see this also in the PowerShell output. Also in the Installation Guide there is a step to Populate Solr Managed Schema and indexing the sitecore_horizon_index. But I do not have this index.
Okay, how to create this index?
See: walkthrough--setting-up-solr

Go to solr directory (e.g C:\Solr\solr-8.4.0\) and create your sc1011_horizon_index following the Walkthrough: Setting up Solr

  • Make dir sc1011_horizon_index below \server\solr\
  • Copy \server\solr\configsets\_default\conf to sc1011_horizon_index
  • Ctrete core.properties in the sc1011_horizon_index
  • Add: <field name="_uniqueid" type="string" indexed="true" required="true" stored="true"/>
     in \conf\managed-schema and change<uniqueKey>id</uniqueKey> to <uniqueKey>_uniqueid</uniqueKey>
  • And restart SOLR.
  • Go to Sitecore Webroot.
    And set the <param desc="core">sc1011_horizon_index</param> to your just created index
  • And restart Sitecore.

Now you should be able to do the steps in the guide:

Prepare the Solr search engine
For the search feature to work in Horizon, after you deploy Horizon, you must populate the Solr managed schema and build the Horizon index.
To prepare the Solr search engine for Horizon:
1. Log into Sitecore.
2. On the Sitecore Launchpad, click Control Panel.
3. In the Indexing section, click Populate Solr Managed Schema.
4. In the Schema Populate dialog box, ensure that the sitecore_horizon_index checkbox is selected.
5. Click Populate.
6. When the Schema Populate dialog box indicates that the indexes have been populated successfully, click Close.
7. On the Control Panel, in the Indexing section, click Indexing Manager.
8. In the Indexing Manager dialog box, select the sitecore_horizon_index checkbox and then click Rebuild.
9. When the search indexes have been rebuilt, click Close.

And Search should now work in Horizon with the special Horizon index..but for me working with the master index work fine the difference between this indexes is the master index contain all items the horizon index is smaller and only contains the content items.

Troubleshooting installing Sitecore Horizon
Some other thing that can help with installing Sitecore Horizon
Help my Sitecore Horizon is not working it just show a blank page or HTTP Error 502.5 - Process Failure. or a HTTP Error 500.19 In this case, check your identityserver you should have the right version of .net core, a valid Sitecore license on your identityserver and the IIS worker should have suffix right. On my laptop I need to change the Application Pool Identity from ApplicationPoolIdentity to NetworkService. How to debug and fix your identiserver read this: Sitecore CLI login error .well-known/openid-configuration

You get an a Sorry, there was an error : unauthorized_client When the url is not listen in the \Config\production\Sitecore.IdentityServer.Host  from the identitserver. Also, check the Horizon.ClientHost in the App_Config\Modules\Horizon\Sitecore.Horizon.Integration.config from the Sitecore CM. this should match with the horizon url. Also check this if you have an error like this: Website will not allow Firefox to display the page if another site has embedded it.