Modify Configs

Edit the SearchStax Sitecore configuration when you need to change Search App endpoints or credentials. This guide identifies the configuration file, explains its authentication settings, and shows how to generate replacement tokens.

Configuration file location

The file to edit is \App_Config\Modules\SearchStax:

<configuration xmlns:patch=http://www.sitecore.net/xmlconfig/>
  <sitecore>
    <searchstax>
      <configs>
        <cloud type="SearchStax.Foundation.Core.Configuration.SearchStaxConfiguration, SearchStax.Foundation.Core" coreIndexName="searchstudio-for-sitecore-test">
          <RootItem>/sitecore/content/tenant/site/home</RootItem>
          <SearchEndpoint>https://ss123456-bhfq2ixl-us-east-1-aws.searchstax.com/solr/searchstudio-for-sitecore-test/emselect</SearchEndpoint>
          <SuggestEndpoint>https://ss123456-bhfq2ixl-us-east-1-aws.searchstax.com/solr/searchstudio-for-sitecore-test/emsuggest</SuggestEndpoint>
          <AuthenticationBasicToken>YXBwNzAtYXBpOkFycmliYSEyMw==</AuthenticationBasicToken>
          <AdminAuthenticationBasicToken>YXBwNzAtYWRtaW46S29uYWJvcyEyMw==</AdminAuthenticationBasicToken>
          <SolrUsername>app70-api</SolrUsername>
          <SolrPassword>Arriba!23</SolrPassword>
          <AdminSolrUsername>app70-admin</AdminSolrUsername>
          <AdminSolrPassword>Arriba!23 </AdminSolrPassword>
          <AnalyticsApiKey>cBVKGLpV3bhcv8vu PBdP0hC5FtxcGnhwOvkK5h6Berw</AnalyticsApiKey>
          <IndexCoreName>searchstudio-for-sitecore-test</IndexCoreName>
        </cloud>
      </configs>
    </searchstax>
  </sitecore>
</configuration>

Understanding authentication tokens

The meaning of most of these settings should be self-evident from the parameters required by the Sitecore Module. The exceptions would be the AuthenticationBasicToken and the AdminAuthenticationBasicToken.

  • AuthenticationBasicToken: The authentication token for the Read-Only Solr user.
  • AdminAuthenticationBasicToken: The authentication token for the Admin Solr user.

You did not have to provide these values when setting up the Sitecore Module, but any changes to the Read-Only or Admin user credentials will force you to generate new tokens and enter them here along with the new credentials.

Generating new tokens

Fortunately, there are web sites that generate authentication tokens based on username and password combinations. One of them is the Basic Authentication Header Generator:

Basic Authentication generator tool showing username

Copy the token from the screen and paste it into the config file.

After editing and saving the config file, you’ll have to restart Sitecore to see the changes take effect.

Articles in this section