Implementing InSite Search After Site Upgrade

How to Implement InSite Search After Site Upgrade | Follow the steps to ensure you set up ISS properly after CMS site upgrades.


After upgrading from an earlier version CMS to Ingeniux CMS 10.x, you may find that it necessary to re-establish InSite Search.

Important: 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.

To set up InSite Search after a CMS site upgrade:

  1. Rebuild the DSS_Preview solution:
      1. Open your DSS solution in Visual Studio after you have run an CMS upgrade against it.
      2. Resolve any missing assembly references, right-click the solution file on the Solution Explorer then select Rebuild.
    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 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.

    Previous Value New Value
    Ingeniux.Runtime.DssContentSearchSource

    Ingeniux.Runtime.Search.DssContentSearchSource

    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 retreive the SiteSearch object.

    Example:

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

     

  2. Verify that Search.config references SearchSource.config, which has been moved from the DSS directory location to the CMS instance: [Drive]:\[path-to-cms-site-instance]\site\App_Data\pub\[publishing-target-name]\settings\SearchSource.config.
    1. In your DSS project's Search.config, verify the following:
      • The Search element's indexLocation attribute points to a LuceneIndex folder, where your main content index will be stored.
      • 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.
       <?xml version="1.0"?> <configuration> <configSections> <section name="Search" type="Ingeniux.Search.Configuration.IndexingConfiguration, Ingeniux.Search"/> </configSections> <Search indexLocation="App_Data\LuceneIndex" indexingEnabled="true" queryMaxClauses="1024"> <Hiliter startTag="<strong>" endTag="</strong>"/> <Settings> <!-- *** See the installed Search.config file for Settings options. *** --> </Settings> <IndexingSources> <add name="CMSPublishedContent" type="Ingeniux.Runtime.Search.DssContentSearchSource" settingsFile="C:\dss\pub\settings\SearchSource.config"/> <add name="SearchNav" type="Ingeniux.Runtime.Search.DssContentSearchSource" settingsFile="C:\dss\pub\settings\SearchSource.config"/> <add name="KeyMatch" type="Ingeniux.Search.KeyMatchSearchDocumentSource" settingsFile="App_Data\KeymatchSource.config"/> <add name="IntranetDirectory" type="Cartella.Search.LdapSearchSourceSource" settingsFile="App_Data\ldapSearchSource.config"/> </IndexingSources> <SearchProfiles> <!-- <add name="Profile1"> <Sources> <add name="CMSPublishedContent" /> <add name="SearchNav" /> </Sources> </add> --> </SearchProfiles> </Search> </configuration> 
  3. For SearchSource.config in ..\[publishing-target-name]\settings:
     <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="Search" type="Ingeniux.Search.Configuration.IndexingSourceConfig, Ingeniux.Search" /> </configSections> <Search> <Settings> <add name="PagesBatchSize" value="2500" /> <add name="DocumentsBatchSize" value="5000" /> <add name="documentLocations" value="" /> </Settings> <DefaultFields /> <Types /> </Search> </configuration> 

    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. 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.

    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 DSS 10.0.
  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. Finally, delete the search index files and then generate a new set of them:
    1. Open IIS and stop the application pool.
    2. Navigate to ..\[DSS directory]\App_Data\LuceneIndex.
    3. Delete all files inside the LuceneIndex folder.
    4. Restart the application pool. Lucene generates new search index files.