Implementing InSite Search After Site Upgrade


Prerequisites:
  • The CMS site instance and DSS instance must be upgraded to CMS 10.x. See CMS 10.0-10.3 Upgrade Considerations for details.
  • If InSite Search is implemented and you want to upgrade to CMS 10.1, upgrade to InSite Search 2.10.14+.
    Version Notes: CMS 10.1 and ISS 2.10.14
    With the release of CMS 10.1, feature updates to the Ingeniux Runtime API have driven changes in InSite Search. If you have implemented InSite Search and wish to upgrade to CMS 10.1, upgrade to InSite Search 2.10.14 or above, as InSite Search 2.9.8 or below will not function on DSS sites upgraded to the CMS 10.1 code base.

After upgrading from an earlier version CMS of your site instance to Ingeniux CMS 10.x, the system may require you to re-establish InSite Search.

Version Notes: CMS 10.1+ and ISS 2.10+

Search Source for CMS Content

The release of CMS 10.1 introduced a change to the Dynamic Site Server's RTAPI to facilitate future upgrades via NuGet package. Customers upgrading DSS projects with a configured InSite Search implementation to the CMS 10.1 code base will need to upgrade to InSite Search 2.10 and will need to update Search.config file so that the type is updated from Ingeniux.Runtime.DssContentSearchSource to Ingeniux.Runtime.Search.DssContentSearchSource for any DSS Content Indexing Source.

Note
This change in search source type will only affect customers upgrading to CMS 10.1 and will be implementing InSite Search 2.10 in their project. This information is not intended for customers who use CMS 9.0 or CMS 10.0. We recommend customers upgrade to the InSite Search 2.11 release to bypass this change in search source type.

Custom Controller Implementations

If your InSite Search implementation relies on a custom controller, you can no longer retrieve the SiteSearch object via the Reference.SiteSearch property. Instead, the Site Search instance is a DSS application variable as of CMS 10.1. If you are using a custom controller, change any instance of the Reference.SiteSearch property to the DSS's local application variable as shown in the example below.

If your custom search controller is not based on the sample search result controller that is found in the DSS project, or you are retrieving results directly on a view, you can construct a new Application variable to retrieve the SiteSearch object.

Example:

var siteSearch = System.Web.HttpContext.Current.Application["SiteSearch"] as Ingeniux.Search.SiteSearch;

To set up InSite Search after a CMS site upgrade:
  1. Rebuild the DSS_Preview solution by completing the following steps:
    1. Open your DSS solution in Visual Studio after you have run an CMS upgrade against it.
    2. Resolve any missing assembly references by right-clicking the solution file on the Solution Explorer and then selecting Rebuild.
  2. Verify that Search.config references SearchSource.config, which has been moved from the DSS directory location to the CMS instance (e.g., [Drive]:\[path-to-CMS-root-folder]\site\App_Data\pub\[publishing-target-name]\settings\SearchSource.config. Verify the reference by completing the following steps:
    1. Navigate to [Drive]:\[path-to-DSS-root-folder], and open Search.config in a text editor.
    2. Ensure that the <Search> element's@ indexLocation attribute points to the luceneindex folder, where your main content index will be stored.Your code should look similar to the following example:
      <Search indexLocation="App_Data\LuceneIndex" indexingEnabled="true">
    3. Ensure that the <IndexingSources> element contains an entry for a valid SearchSource.config file, which is generated on publish of CMS content to the publishing content's settings folder.

      Your code should look similar to the following example:

      <IndexingSources>
          <add name="CMSPublishedContent" type="Ingeniux.Runtime.Search.DssContentSearchSource"
          settingsFile="C:\igxdss\dss-published-content\settings\SearchSource.config"/>
      </IndexingSources>
    4. Save and close Search.config.
  3. To index binary documents within a particular search type, ensure that the BinaryDocument/documentComponents name/value pair has been added to the appropriate <add> element in SearchSource.config (e.g., [Drive]:\[path-to-DSS-root-folder]\[publishing-target-name-folder]\settings).
    Additional Information
    In SearchSource.config, the documentComponents/BinaryDocument name/value pair specifies that binary document components that will be indexed by including the document asset as part of the total searchable text collection.
    Caution
    Performing either an incremental or a full publish rolls back SearchSource.config to its default settings. If you have customized this file, you need to update the default settings after a publish.
    Note
    Page names are indexed. By default, name is added as a default field on publish.
  4. Ensure that the Adobe Reader iFilter Package and the Microsoft Office iFilter package are installed on the DSS.
  5. Run a full publish and make a backup of the DSS web.config file.
  6. Upgrade your DSS instance to Ingeniux CMS 10.x DSS. See Upgrading Existing DSS Site to Version 10.0-10.3 for details.
  7. After the upgrade completes, diff the new DSS web.config against the one you backed up. Any customization to the DSS web.config gets overwritten during upgrade, so merge these changes from the old web.config to the new file.
  8. Navigate to the Lucene index to delete the existing search index files and generate a new ones.
    1. Open IIS and stop the application pool.
    2. Navigate to [Drive]:\[path-to-DSS-root-folder]\App_Data\luceneindex.
    3. Delete all files inside the luceneindex folder.
    4. Restart the application pool. Lucene generates new search index files.