How to Upgrade SmartHub

Use the following instructions to upgrade BA Insight SmartHub.

 

Warnings and Special Notices

WARNING! When you upgrade SmartHub, your local SmartHub files are overwritten.

  • You must save or backup your local files to avoid losing any critical data or customizations.

Known limitations when upgrading SmartHub from 6.0.x to 6.1.0.0

Due to the changes made to support vector search, any Microsoft Azure search engines that are already configured will not work after upgrading SmartHub from 6.0.x to 6.1.0.0, due to the changes needed to support Vector Search. To fix the Microsoft Azure search engines, follow the steps:

  1. Create a backup of your FederatorConfiguration.xml file found at <SH_root>\Configuration. This step is only a safety measure in case something goes wrong in the steps below.

  2. Navigate to the SmartHub Administration page found at <SH_address>/_admin.

  3. Select the General Settings page.

  4. Scroll down to the Import/Export Settings section.

  5. Click EXPORT SETTINGS.

  6. Click IMPORT and select the newly downloaded FederatorConfiguration.xml file. The FederatorConfiguration.xml file must be decrypted.

  7. Verify that Microsoft Azure search engine settings are correct and that they contain a new Query Tuning stage named AzureTranslator.

Note: Your Elasticsearch and Kibana (for the Analytics component) versions must match.
  • For example, if you use Elasticsearch v8.6, you must also use Kibana v8.6.

Note: The Custom Settings file was also upgraded and it should follow the following format:

  • SH.ModuleName= SH.ModuleName|| {};

  • SH.ModuleName.CustomSettings = {};

  • SH.ModuleName.PathsToExclude = [];

Example :
Copy
SH.ContentIntelligence = SH.ContentIntelligence || {};
SH.ContentIntelligence.CustomSettings = {};
SH.ContentIntelligence.PathsToExclude = [];

The Plugins module has been changed to follow the same pattern:

  • SH.Plugins = SH.Plugins || {};

  • SH.Plugins.CustomSettings = {};

Note:The following components have their configuration overwritten when you upgrade SmartHub.
Make sure to back up their configuration and manually re-add them after SmartHub is updated.

  • Learn-To-Rank Scheduled Task

  • Any tool under the /Tools folder (Example: Analytics Exporter, TaxonomyPreloader, etc)

Before You Start

Customizations and Backup

  • The upgrade process overwrites local files, including files that contain any customizations you may have created.
  • Move your customized files to an outside directory and then copy them back into your active SmartHub directory, when your SmartHub directory contains the new, v6.0 SmartHub files.
  • Create a backup of your entire SmartHub installation directory to ensure you can restore your settings and do not loose any important customization information.
Note!!: If you have made customizations to any native, out-of-the-box files, such as web.config, those customizations are overwritten during the SmartHub upgrade process.
  • Create a backup of your entire Analytics installation directoryfor the same reason as above. 
  • Backup any modified native files, such as web.config BEFORE PROCEEDING.

Download New Version of SmartHub

  1. Download and unzip the latest release of SmartHub (a single .zip file) from the Right Answers Portal if you have not already done so.

    1. Navigate to Upland Community > Knowledge > BA Insight > Product Downloads > SmartHub.

    2. Save the file to the server to host SmartHub.

    3. Right-click the downloaded .zip file and check the Unblock checkbox.

    4. Click OK.

    5. Extract the contents of the .zip file.

Upgrade Details

The following table displays the SmartHub HTML page structure: v5.x vs. v6.0

  • SmartHub v5.x uses a component ("Old Component" in the table below) to declare various SmartHub modules

    • These components are not supported by SmartHub v6.0

    • These components are defined as <div classes>.

      • Example: <div class="CoveoSearchbox">
    • Settings (parameters) for each component are defined, nested, within each <div>

  • SmartHub v6.0 uses a component ("New Component" in the table below) to declare various SmartHub modules

    • These components are defined as <div classes>.

      • For example, <div class="sh-search-section">
    • Settings (parameters) for each component are defined in the settings (.js) file for each of your SmartHub site's HTML page

      • Example

        • HTML page: Results.html

        • Page Settings: ResultsPageSettings.js

        • Custom Page Settings: ResultsCustomSettings.js

SmartHub Component Comparison table: v5 vs v6

SmartHub Page v5.x Component v6.x Component
  • Landing.html

  • Index.html

  • Results.html

  • SmartAutomations.html

CoveoResultList sh-result-list
CoveoContentBySearch sh-content-by-search
CoveoSearchBox sh-search
CoveoSort sh-sort
CoveoQuerySummary sh-query-summary
CoveoPager sh-pager
CoveoErrorReport sh-error-report
CoveoSmartPreviews
  • No new component

  • Controlled by the page custom settings .js file

raw result
coveo-result-frame sh-cbs-item
CoveoResultLink sh-result-link
CoveoActionBar cbs-action-bar
CoveoFieldValue sh-field-value

Upgrade Procedure

Read and satisfy all of the bullets in the topic "Before You Start," above.

Use the following procedure to upgrade your instance of SmartHub:

  1. Open IIS Manager and click Application Pools from the left navigation pane.
  2. Select your SmartHub Application Pool, which was setup and named when you first installed SmartHub, and click Stop from the Actions menu on the right side pane.
  3. Click Edit Site > Basic Settings to instruct IIS to use the clean SmartHub 6.0 unzipped directory path.

  4. Copy the configuration folder and customization folder into the new SmartHub folder.
  5. Make sure that your configuration is either decrypted or encrypted using the environment variables. If it is not, use the encryption tool to apply the correct encryption or decrypt the configurations.
  6. Open IIS Manager and click Application Pools.

  7. Select your SmartHub Application Pool, which was set up and named when you first installed SmartHub, and then click Start from the Actions menu.

  8. If your HTML pages use any of the unsupported components you must update them. See the sections below.

  9. To test if the upgrade was successful, open a new browser window, enter your SmartHub URL and run a test query.

  10. At this point you will see either:

    • Your SmartHub site landing page

    • A blank page

  11. If you see a blank page an upgrade is required, and you must update the Federator configuration.

    1. For more information, see How to Add the Content Containers Module.

  12. For help with any installation errors, contact BA Insight support.
  13. Proceed to the next section.

Update Federator Configuration

A manual update for the Federator Configuration file (FederatorConfiguration.xml) is required if any of the following tunings are used:

  • PersonalizedQuery

  • SPOnlineRefinerMapper

  • SPOnPremRefinerMapper

The required steps are:

  1. Navigate to the configuration folder and open the FederatorConfiguration.xml file in a text editor.

  2. Search and replace:

    1. Find:

      1. <ClassDefinitionName>Personalized Query</ClassDefinitionName>

    2. Replace with:

      1. <ClassDefinitionName>PersonalizedQuery</ClassDefinitionName>

  3. Search and replace:

    1. Find:

      1. <ClassDefinitionName>SharePoint Online Refiner Mapper</ClassDefinitionName>

    2. Replace with:

      1. <ClassDefinitionName>SPOnlineRefinerMapper</ClassDefinitionName>

  4. Search and replace:

    1. Find:

      1. <ClassDefinitionName>SharePoint OnPremise Refiner Mapper</ClassDefinitionName>

    2. Replace with:

      1. <ClassDefinitionName>SPOnPremRefinerMapper</ClassDefinitionName>

  5. Search and replace:

    1. Find:

      1. <ClassDefinitionName>Property Mapper</ClassDefinitionName>

    2. Replace with:

      1. <ClassDefinitionName>PropertyMapper</ClassDefinitionName>

  6. Search for and remove:

    1. <ClassDefinition xsi:type="InternalClassDefinition" Name="PubMedBackend" ClassName="BAInsight.PubMedSearch.FederatorExtension.Backends.PubMedBackend" AssemblyName="BAInsight.PubMedSearch.FederatorExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

  7. Search for and remove:

    1. <ClassDefinition xsi:type="InternalClassDefinition" Name="PseudoRandom" ClassName="BAInsight.Longitude.Federator.Runtime.PseudoRandomMixingAlgorithm" AssemblyName="BAInsight.Longitude.Federator.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8f7c569a7e8bde81" />

  8. Search for and remove:

    1. <ClassDefinition xsi:type="InternalClassDefinition" Name="Expertise Locator" ClassName="BAInsight.ExpertiseFinder.FederatorExtension.Backends.ExpertiseBackend" AssemblyName="BAInsight.ExpertiseFinder.FederatorExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd5ed2e4b6962cd0" />

 

Migrate User Profile Providers and User Picture Providers

User Profile Providers and User Picture Providers are no longer backward compatible with SmartHub v5.x.

You must reconfigure them.

If you don't remember the settings that you need to use then check the current configuration in 5.x.

  1. Go to SmartHub Administration page → User Profile Settings.

  2. Remove current providers

  3. Click Configure to add new providers

Note: SharePoint Online Provider has been replaced by Microsoft O365 Provider.

Upgrade Your Result Display Templates

Procedure:

  1. Open the SmartHub Administration page at http(s)://<web-app-url>/_admin

  2. Click the link UI Builder on the left-side navigation.

  3. On the desired directory, click the sprocket icon, select NewPage.

  4. Choose DisplayTemplate Page and enter a name for the page.

Caution!! You must create an HTML template for each script used in the ResultList component.
  • In the new HTML templates replace:

    • "raw" with "result"

    • "coveo-result-frame" with "sh-result-item"

    • "CoveoResultLink" with "sh-result-link"

    • "CoveoActionBar" with "sh-action-bar"

    • "CoveoFieldValue" with "sh-field-value"

HTML Templates Sample

  • For the script that has data-condition="isUserProfile != 'true'"

  • The template will be saved as an HTML file name "myItemTemplate"

  • The name of the template and the location it is saved to is your choice.

Copy
<!-- <div class="coveo-result-frame core-result"> becomes next line instead -->
<div class="sh-result-item core-result">
 
    <div class="core-result-info-wrapper">
        <div class="core-result-info">
            <div class="core-info" >
 
                <!-- <a class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true"></a>  becomes next line instead -->
                <a class="sh-result-link analytics-track-openItem" href="<%= result.clickUri %>" title="<%= result.title %>"><%= result.title %>
 
            </div>
            <div class="core-info" >
                <!-- <div class="CoveoFieldValue result-summary" data-field="@excerpt" data-caption="Excerpt" data-html-value='true'></div>  becomes next line instead -->
                <div class="sh-field-value">
                    <div><%= result.excerpt %></div>
                </div>
            </div>
            <div class="core-info widgets-placeholder" ></div>
        </div>
 
        <!-- <div class="CoveoActionBar core-action-bar" >  becomes next line instead  -->
        <div class="sh-action-bar core-action-bar" >
 
               <!-- <a class='CoveoResultLink prettyURL sh-float-left' rel='noreferrer' target="_blank"> becomes next line instead -->
            <a class='sh-result-link prettyURL sh-float-left' target="_blank" href="<%= result.clickUri %>">
 
                <span title="<%= (result.filetype||'document') + " from " + (result.contentsource || result.clickUri || 'Source') %>"><%= (SH.utils.getSourceSystemImage(result.clickUri, result.ContentSource) || result.ContentSource) %></span>
                <span title="<%= result.clickUri %>"><%= SH.utils.prettifyURL(result.clickUri) %></span>
            </a>
            <div class="open-preview-button hidden  sh-float-right">
                <i class="sh-icon-button far fa-eye"></i>
                <span>Preview</span>
            </div>
        </div>
    </div>
</div>

For the script that has the code data-condition="isUserProfile == 'true'", see the following:

  • The template is saved as an HTML file name "myPeopleTemplate".

  • The name and save location is your choice.

Copy
!-- <div class="coveo-result-frame core-result">  becomes next line instead -->
 
    <div class="CoveoPreview sh-float-left" data-small="true" data-shape="round"><img src="<%= result.blobUrl %>"></div>
    <div class="core-result-info-wrapper sh-float-left">
        <div class="core-result-info">
            <div class="core-info" >
 
                !-- <a class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true"></a> becomes next line instead -->  
                <a class="sh-result-link analytics-track-openItem" href="<%= result.clickUri %>" title="<%= result.title %>"><%= result.title %></a>
 
            </div>
            <div class="core-info" >
 
                !-- <div class="CoveoFieldValue" data-field="@AboutMe" data-caption="AboutMe" data-html-value='true'></div> becomes next line instead -->
                <div class="sh-field-value"><%= result.AboutMe %></div>
 
            </div>     
        </div>
        <div class="core-action-bar" >
            <span class="prettyURL sh-float-left">
                <span>
 
                    !-- <span class="CoveoFieldValue" data-field="@Department" data-caption="Department" data-html-value='true'></span> becomes next line instead -->
                    <span class="sh-field-value"><%= result.Department %></span>
 
                </span>
                <span></span>
 
                <!-- <span class="CoveoFieldValue" data-field="@JobTitle" data-caption="JobTitle" data-html-value='true'></span> becomes next line instead -->
                <span class="sh-field-value"><%= result.JobTitle%></span>
 
 
            </span>
            <div class="sh-float-right action-bar-button">
 
                !-- <a class='CoveoResultLink' rel='noreferrer' data-href-template='sip:${WorkEmail}'>  becomes next line instead -->
                <a class='sh-result-link' data-href-template='im:<sip:${"<%= result.WorkEmail %>"}' href='im:<sip:<%= result.WorkEmail %>>'>
 
                    <i class="sh-icon-button far fa-comments"></i>
                    <span>Skype</span>
                </a>
            </div>
            <div class="sh-float-right action-bar-button">
 
                <!-- <a class='CoveoResultLink' rel='noreferrer' data-href-template='mailto:${WorkEmail}'> becomes next line instead -->
                <a class='sh-result-link' data-href-template='mailto:${"<%= result.WorkEmail %>"}' href='mailto:<%= result.WorkEmail %>'>
 
                    <i class="sh-icon-button far fa-envelope"></i>
                    <span>Mail</span>
                </a>  
            </div>
        </div>
    </div>
</div>

Upgrade Your Pages

Procedure:

  1. Open the SmartHub Administration page at http(s)://<web-app-url>/_admin

  2. Click the link UI Builder on the left-side navigation.

  3. From the left side panel navigate to your custom page.

  4. Later in the process, you will need the original HTML for the page, so you should duplicate the page or use the backup created at the start of the upgrade process. To duplicate the page, click the sprocket icon and select Duplicate.

  1. Open the page in the editor and click Upgrade when the Upgrade notification appears.

Note: The upgrade process modifies HTML for the selected page. Make sure that you have a backup before clicking on the Upgrade button
  • The deprecated elements will be replaced with the equivalent ones and a basic set of settings will be created

Example

SmartHub 5.6 Page Pre-upgrade

Copy
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="/image/favicon.jpg" rel="shortcut icon" />                   
 
    <script>
        {
            /*
             
                To add custom js/css files or exclude / modify the parameters of those loaded by default,
                use /modules/SmartHubResourceLoader/CustomSettingsTemplate.js as a template for your custom settings file.
 
            */
                window.SHRootLevelURL = "%LANGUAGE%".replace("%LANGUAGE%", "");
 
                    const customSettingsFile = SHRootLevelURL + "/modules/SmartHubResourceLoader/CustomSettingsTemplate.js";
 
                    const neverCachedJS = [
 
                        SHRootLevelURL + "/modules/SmartHubResourceLoader/ResultsPageSettings.js",
                        customSettingsFile,
                        SHRootLevelURL + "/modules/SmartHubResourceLoader/SmartHubResourceLoader.js"
                    ]
 
                    const now = new Date().getTime()
 
                    neverCachedJS.forEach(function (src) {
                        const existing = document.querySelector("script[src^='" + src + "?']");
                        if(existing) {
                            existing.remove();
                        }
                        const script = document.createElement('script')
                        script.src = src + '?' + now
                        script.async = false
                        document.head.appendChild(script)
 
                    })                
        }
    </script>
 
</head>
 
<body hidden id="search" class="sh-grid CoveoSearchInterface BAInsightCustom" data-run-empty-query="false" data-hide-until-first-query="false"
    data-enable-duplicate-filtering="true" data-enable-history="true" data-design="new">
    <div class="sh-row-header sh-header-grid">
        <div class="sh-header-top sh-column-left">
            <a href="/">
                <img class="logo" src="/image/logo.png" />
            </a>
        </div>
        <div class="coveo-search-section sh-header-top sh-column-middle">
            <div class="CoveoSearchbox" data-placeholder="Search..." data-add-scoped-search="true" data-show-keep-refiners="true"></div>
        </div>
        <div class="sh-header-top ribbon-container sh-column-right"></div>
        <div class="sh-header-bottom sh-column-left"></div>
        <div class="sh-header-bottom sh-column-middle">
            <div id="menu"></div>
            <div class="CoveoSettings" data-caption="Tools" data-show-icon="false">
                <div class="CoveoShareQuery"></div>
                <div class="CoveoExportToExcel" data-number-of-results="500" data-batch-size="500"
                    data-template-path="~/Templates/ExportToExcelTemplate.xlsx" data-start-cell="A1"
                    data-property-mappings="title,Title;author,Author;excerpt,Summary;filetype,Result Type;date,Last Modified Time;ContentSource,Content Source;clickUri,Document Path;Size,File Size(in bytes)">
                </div>
            </div>
        </div>
        <div class="sh-header-bottom sh-column-right"></div>
    </div>
    <div class="sh-row-body sh-body-grid coveo-main-section hidden">
     
        <!-- Left column -->
        <div class="sidebar sh-column-left responsive-grid-facets-container">
            <div class="coveo-facet-column">
                <div class="CoveoFacet" data-default-state="collapsed" data-title="Display Author"
                     data-field="@DisplayAuthor" data-lookup-field="@DisplayAuthor"
                     data-available-sorts="occurrences,alphaascending,alphadescending"
                     data-enable-settings="false" data-searchbox-position="bottom"></div>
                <div class="CoveoFacet" data-default-state="collapsed" data-title="Result type" data-field="@filetype"
                     data-lookup-field="@filetype" data-available-sorts="occurrences,alphaascending,alphadescending" data-enable-settings="false" data-searchbox-position="bottom">
                </div>
                <div class="CoveoFacet" data-default-state="collapsed" data-title="ContentSource"
                     data-field="@ContentSource" data-lookup-field="@ContentSource" data-enable-settings="false" data-searchbox-position="bottom"></div>
                <div class="CoveoFacetDatePicker" data-start="auto" data-end="auto" data-default-state="collapsed" data-title="Modified Date"
                     data-field="@date" data-lookup-field="@date" data-slider-graph-steps="20" data-range-slider="true"
                     data-date-field="true" data-available-sorts="occurrences,alphaascending,alphadescending" data-enable-settings="false"></div>
            </div>
    
            <div class="coveo-tab-section">
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-globe" data-id="b29924a9-ec32-4c10-8892-a544b69ee121" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="Everything"></a>
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-users" data-id="b09a7990-05ea-4af9-81ef-edfab16c4e31" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="People"></a>
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-comments" data-id="459dd1b7-216f-4386-9709-287d5d22f568" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="Conversations"></a>
            </div>
        </div>
         
        <!-- Center column -->
        <div class="coveo-results-column sh-column-middle">
            <div class="bot-autocorrect-message-root"></div>
            <div class="bot-loading"></div>
            <div class="CoveoBreadcrumb"></div>
            <div class="bot-injected-results">
                <div class="CoveoContentBySearch botCBS" data-results-per-page='3' data-enable-duplicate-filtering="true" data-query-text='' data-source-id="b29924a9-ec32-4c10-8892-a544b69ee121" data-auto-trigger-query="false" data-hide-until-first-query="false" data-display-condition="false">
                    <div class="botCBS-card-header">
                        <div class="botCBS-card-title-wrapper">
                            <div id="MyInterests" class="botCBS-card-title">Suggested results: </div>
                        </div>
                    </div>
                    <div class="CoveoResultList"></div>
                    <a class="CoveoTab" data-id="b29924a9-ec32-4c10-8892-a544b69ee121"
                       data-expression='{searchboxquery} FederatorBackends:"*"'></a>
                </div>
            </div>
            <div class="coveo-summary-section">
                <span class="CoveoQuerySummary"></span>
            </div>
            <div class="CoveoResultList" data-caption="List" data-layout="bailist" data-fields-to-include="@clickUri,@Title,@excerpt,@title,@JobTitle,@Department,@AboutMe,@escbasecrawurl,@WorkEmail">
                <script type='text/underscore' class='result-template' data-condition="isError == true">
                    <div class="coveo-result-frame core-result">
                        <div class="core-result-info-wrapper">
                            <div class="core-result-info">
                                <div class="core-info" >
                                    <div class="CoveoFieldValue result-summary" data-field="@HitHighlightedSummary" data-caption="Error" data-html-value='true'></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>
                <script type='text/underscore' class='result-template' data-condition="raw.isAuth == true">
                    <div class="coveo-result-frame core-result">
                        <div class="core-result-info-wrapper">
                            <div class="core-result-info">
                                <div class="core-info" >
                                <i class="sh-icon-button fas fa-info-circle"></i>
                                    <a class="auth-title" onClick="<%=raw.clickUri%>" data-backend-name="<%=raw.backendName%>"  > <%= raw.title %> </a>
                                    <div class="CoveoFieldValue result-summary" data-field="@HitHighlightedSummary"  data-html-value='true'></div>
                                </div>
                                 <div class="core-info" >
                                    <div class="CoveoFieldValue result-summary" data-field="@excerpt" data-caption="Excerpt" data-html-value='true'></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>
                <script type='text/underscore' class='result-template' data-condition="isUserProfile != 'true'">
                    <div class="coveo-result-frame core-result">
                        <div class="CoveoOpenPreviewAction"></div>
                        <div class="core-result-info-wrapper">
                            <div class="core-result-info">
                                <div class="core-info" >
                                    <a class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true"></a>
                                </div>
                                <div class="core-info" >
                                    <div class="CoveoFieldValue result-summary" data-field="@excerpt" data-caption="Excerpt" data-html-value='true'></div>
                                </div>
                                <div class="core-info widgets-placeholder" ></div>
                            </div>
                            <div class="CoveoActionBar core-action-bar" >
                                <a class='CoveoResultLink prettyURL sh-float-left' rel='noreferrer' target="_blank">
                                    <span title="<%= (raw.filetype||'document') + " from " + (raw.contentsource || raw.clickUri || 'Source') %>"><%= (SH.utils.getSourceSystemImage(raw.clickUri, raw.ContentSource) || raw.ContentSource) %></span>
                                    <span title="<%= raw.clickUri %>"><%= SH.utils.prettifyURL(raw.clickUri) %></span>
                                </a>
                                <div class="open-preview-button hidden  sh-float-right">
                                    <i class="sh-icon-button far fa-eye"></i>
                                    <span>Preview</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>
                <script type='text/underscore' class='result-template' data-condition="isUserProfile == 'true'">
                    <div class="coveo-result-frame core-result">
                        <div class="CoveoPreview sh-float-left" data-small="true" data-shape="round"></div>
                        <div class="core-result-info-wrapper sh-float-left">
                           <div class="core-result-info">
                                <div class="core-info" >
                                    <a class="CoveoResultLink" rel='noreferrer' data-always-open-in-new-window="true"></a>
                                </div>
                                <div class="core-info" >
                                    <div class="CoveoFieldValue" data-field="@AboutMe" data-caption="AboutMe" data-html-value='true'></div>
                                </div>
                            </div>
                            <div class="core-action-bar" >
                                <span class="prettyURL sh-float-left">
                                    <span>
                                        <span class="CoveoFieldValue" data-field="@Department" data-caption="Department" data-html-value='true'></span>
                                    </span>
                                    <span></span>
                                    <span class="CoveoFieldValue" data-field="@JobTitle" data-caption="JobTitle" data-html-value='true'></span>
                                </span>
                                <div class="sh-float-right action-bar-button">
                                    <a class='CoveoResultLink' rel='noreferrer' data-href-template='sip:${WorkEmail}'>
                                        <i class="sh-icon-button far fa-comments"></i>
                                        <span>Skype</span>
                                    </a>
                                </div>
                                <div class="sh-float-right action-bar-button">
                                    <a class='CoveoResultLink' rel='noreferrer' data-href-template='mailto:${WorkEmail}'>
                                        <i class="sh-icon-button far fa-envelope"></i>
                                        <span>Mail</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>
            </div>
            <div class="CoveoContentBySearch cbs-tab-container" id="top-results" data-query-text='* FederatorBackends:"*"' data-source-id="b29924a9-ec32-4c10-8892-a544b69ee121" data-results-per-page='3' data-hide-until-first-query="false">
                <div class="content-by-search-title header-results-message">Top results from web</div>
                <div class="CoveoResultList tab-container top-result-list" data-layout="bailist" data-fields-to-include='@Title,@ContentSource,@date,@clickUri,@filetype'>
                    <script type='text/underscore' class='result-template'>
                        <div class="coveo-result-frame core-result table-core-result core-top-result">
                            <div class="core-result-info-wrapper">
                                <div class="core-table-result-info">
                                    <div class="core-cell col-one file-type-preview">
                                        <img src="<%= SH.utils.getIconUrl(raw.filetype) %>" />
                                    </div>
                                    <div class="core-cell col-two">
                                        <div class="cell-title">
                                            <a class="CoveoResultLink ResultTitle cell" rel='noreferrer' target="_blank"></a>
                                        </div>
 
                                        <div class="cell-info col-three">
                                            <div class="CoveoFieldValue" data-field="@date" data-caption="date" data-helper='date'></div>
                                            <div class="CoveoFieldValue" data-field="@ContentSource" data-caption="Content source" data-html-value='true'></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </script>
                </div>
            </div>
            <div class="footer-zone">
                <div class="CoveoPager"></div>
            </div>
        </div>
         
        <!-- Right column -->
        <div class="chatbot-sidebar sh-column-right">
            <div class="smartAutomations"></div>
        </div>
    </div>
    <div class="sh-row-footer">
    </div>
</body>
 
</html>

SmartHub 5.6 Page Post-upgrade

Copy
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link href="/image/favicon.jpg" rel="shortcut icon" />                   
 
    <script>
        {
            /*
             
                To add custom js/css files or exclude / modify the parameters of those loaded by default,
                use /modules/SmartHubResourceLoader/CustomSettingsTemplate.js as a template for your custom settings file.
 
            */
                window.SHRootLevelURL = "%LANGUAGE%".replace("%LANGUAGE%", "");
 
                    const customSettingsFile = SHRootLevelURL + "/_bai/v1.0/pagesettings";
 
                    const neverCachedJS = [
 
                        SHRootLevelURL + "/modules/SmartHubResourceLoader/ResultsPageSettings.js",
                        customSettingsFile,
                        SHRootLevelURL + "/modules/SmartHubResourceLoader/SmartHubResourceLoader.js"
                    ]
 
                    const now = new Date().getTime()
 
                    neverCachedJS.forEach(function (src) {
                        const existing = document.querySelector("script[src^='" + src + "?']");
                        if(existing) {
                            existing.remove();
                        }
                        const script = document.createElement('script')
                        script.src = src + '?' + now
                        script.async = false
                        document.head.appendChild(script)
 
                    })                
        }
    </script>
 
</head>
 
<body hidden id="search" class="sh-grid CoveoSearchInterface BAInsightCustom" data-run-empty-query="false" data-hide-until-first-query="false"
    data-enable-duplicate-filtering="true" data-enable-history="true" data-design="new">
    <div class="sh-row-header sh-header-grid">
        <div class="sh-header-top sh-column-left">
            <a href="/">
                <img class="logo" src="/image/logo.png" />
            </a>
        </div>
        <div class="sh-header-top sh-column-middle sh-search-section">
             
        </div>
        <div class="sh-header-top ribbon-container sh-column-right"></div>
        <div class="sh-header-bottom sh-column-left"></div>
        <div class="sh-header-bottom sh-column-middle">
            <div id="menu"></div>
            <div class="CoveoSettings" data-caption="Tools" data-show-icon="false">
                <div class="CoveoShareQuery"></div>
                <div class="CoveoExportToExcel" data-number-of-results="500" data-batch-size="500"
                    data-template-path="~/Templates/ExportToExcelTemplate.xlsx" data-start-cell="A1"
                    data-property-mappings="title,Title;author,Author;excerpt,Summary;filetype,Result Type;date,Last Modified Time;ContentSource,Content Source;clickUri,Document Path;Size,File Size(in bytes)">
                </div>
            </div>
        </div>
        <div class="sh-header-bottom sh-column-right"></div>
    </div>
    <div class="sh-row-body sh-body-grid coveo-main-section hidden">
     
        <!-- Left column -->
        <div class="sidebar sh-column-left responsive-grid-facets-container">
            <div class="coveo-facet-column">
                <div class="CoveoFacet" data-default-state="collapsed" data-title="Display Author"
                     data-field="@DisplayAuthor" data-lookup-field="@DisplayAuthor"
                     data-available-sorts="occurrences,alphaascending,alphadescending"
                     data-enable-settings="false" data-searchbox-position="bottom"></div>
                <div class="CoveoFacet" data-default-state="collapsed" data-title="Result type" data-field="@filetype"
                     data-lookup-field="@filetype" data-available-sorts="occurrences,alphaascending,alphadescending" data-enable-settings="false" data-searchbox-position="bottom">
                </div>
                <div class="CoveoFacet" data-default-state="collapsed" data-title="ContentSource"
                     data-field="@ContentSource" data-lookup-field="@ContentSource" data-enable-settings="false" data-searchbox-position="bottom"></div>
                <div class="CoveoFacetDatePicker" data-start="auto" data-end="auto" data-default-state="collapsed" data-title="Modified Date"
                     data-field="@date" data-lookup-field="@date" data-slider-graph-steps="20" data-range-slider="true"
                     data-date-field="true" data-available-sorts="occurrences,alphaascending,alphadescending" data-enable-settings="false"></div>
            </div>
    
            <div class="coveo-tab-section">
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-globe" data-id="b29924a9-ec32-4c10-8892-a544b69ee121" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="Everything"></a>
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-users" data-id="b09a7990-05ea-4af9-81ef-edfab16c4e31" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="People"></a>
                <a class="CoveoTab" data-icon="sh-icon-button fas fa-comments" data-id="459dd1b7-216f-4386-9709-287d5d22f568" data-expression='{searchboxquery} FederatorBackends:"*"' data-caption="Conversations"></a>
            </div>
        </div>
         
        <!-- Center column -->
        <div class="coveo-results-column sh-column-middle">
            <div class="bot-autocorrect-message-root"></div>
            <div class="bot-loading"></div>
            <div class="CoveoBreadcrumb"></div>
            <div class="bot-injected-results">
                 
            </div>
            div class="coveo-summary-section">
                 
            </div>
            <div class="sh-main-results-container analytics-track-itemsContainer"></div>
            <div class="CC1"></div>
 
             <div class="footer-zone">
                 
            </div>
        </div>
         
        <!-- Right column -->
        <div class="chatbot-sidebar sh-column-right">
            <div class="smartAutomations"></div>
        </div>
    </div>
    <div class="sh-row-footer">
    </div>
</body>
 
</html>

 

Note:

The upgrade process makes the following changes to the HTML page.

  • Components that no longer exist are removed and sets them as settings if applied.

    • Example: "CovePager"
  • It changes the structure for the components that have a new structure.

    • Example: CoveoContentBySearch becomes <div class="CC#"></div> with additional settings that can be seen in the "Advanced settings edit" tab under SH.ContentContainers

The upgrade process does not automatically create the item templates for your existing items. After the upgrade the "Advanced settings edit" tab from the Advanced mode will also become available. You should ensure that the folder structure is the same before attempting to Upgrade.

  1. Go to "Advanced settings edit" tab from the Advanced mode

  2. Update the ItemTemplatePicker functions to use the newly created DisplayTemplates

SH.ContentContainers.CustomSettings Sample

Copy
ContentContainers: {
        SampleContentContainerWithDefaultValues: {
            ParentContainerSelector: '.sh-main-results-container',
            Title: '',
            ControlTemplatePath: SH.RootLevelURL + "/modules/ContentContainers/templates/controlResultTemplate.html",
            ItemTemplatePicker:  function (result) {
                    if (result.isUserProfile == 'true') /* These are the same conditions used in on the scripts inside the ResultList component */
                        return SH.RootLevelURL + "/myFolder/myPeopleTemplate.html";
                    return SH.RootLevelURL + "/myFolder/myItemTemplate.html";,
            QueryText: '',
            QueryTemplate: '{searchboxquery} FederatorBackends:"*"',
            SourceId: 'b29924a9-ec32-4c10-8892-a544b69ee121',
            RowsPerPage: 5,
            EnablePagination: false,
            EnableCountTotal: false,
            EnableSmartPreviews: true,
            EnableContentIntelligence: true,
            EnableResultFeedback: true,
            EnableRatings: false,
            ShowSort: false,
            SortProperties: 'Rank,Date',
            SortDirection: 'Descending,Ascending',
            IsMainResults: true,
            FieldsToInclude: 'clickUri,title,Rank,ContentSource,FileExtension,excerpt,SDFUrl,LastModifiedTime,DisplayAuthor,isUserProfile,WorkEmailclickUri,Title,JobTitle,Department,AboutMe,escbasecrawurl,WorkEmail,UserName',
            TriggerNewQueryOn: 'deferredQuerySuccess'      
        },
        SampleContentContainerWithDefaultValues: {
            ParentContainerSelector: '.sh-cbs-container',
            Title: 'MyCBS',
            ControlTemplatePath: SH.RootLevelURL + "/modules/ContentContainers/templates/cbsControlTemplate.html",
            ItemTemplatePicker:  function (result) {return SH.RootLevelURL + "/myFolder/myTemplate.html";,
            QueryText: '',
            QueryTemplate: '{searchboxquery} FederatorBackends:"*"',
            SourceId: 'b29924a9-ec32-4c10-8892-a544b69ee121',
            RowsPerPage: 5,
            IsMainResults: false,
            FieldsToInclude: 'clickUri,title,Rank,ContentSource,FileExtension,excerpt,SDFUrl,LastModifiedTime,DisplayAuthor,isUserProfile,WorkEmailclickUri,Title,JobTitle,Department,AboutMe,escbasecrawurl,WorkEmail,UserName',
            TriggerNewQueryOn: 'load'      
        }
    }

Other Breaking Changes

  1. QueryTerms (response.detail.results.queryTerms) from the response of 'querySuccess' event:

    • SmartHub 6.x: this is an object

    • SmartHub 5.x: this is an array

  2. If you use any custom module, and you use queryTerms, you must update the code to use queryTerms as object:

    • For example: SHSmartPreviewsLoader.js

  3. Some event names have changed in SmartHub v6.0. Refer to the list of supported events in the SmartHub UI Events page.

  4. Some class names frequently used in scripting have changed:

    • BAInsight.Longitude.Federator.Runtime.Security.SecurityUtilBAInsight.Longitude.Federator.Runtime.Security.SecurityPermissions

    • BAInsight.Longitude.Federator.Common.Util.OAuthUserContextBAInsight.SmartHub.Core.Security.Context.JWTUserContext

  5. Claims are not public now.

    • Instead, the get/set method is used:

  6. Copy
    var email = userContext.GetProperty("email", "");
    userContext.SetProperty("email", email);