Implementing InSite Search for CMS 9 SR5+


As of CMS 9 SR5, Ingeniux has simplified the process to implement the InSite Search module through the use of Nuget packages. There are two packages related to InSite Search:

The following instructions can be used for Dynamic Site Server (DSS) projects that have been created or upgraded to a release of CMS 9 SR5 or greater. Refer to the InSite Search Release Notes page for the correct version of each package to be used with the version of CMS 9 that you may be running in your production or development environments.

1) Rebuild the DSS_Preview solution.

  1. Navigate to [siteRoot]\DSS_Preview and open the DSS_Preview solution file in Visual Studio.
  2. On the Solution Explorer, open the References node and check for any missing assembly references (they're marked with an exclamation point).

    Ingeniux.Search

  3. You also need to replace the legacy IgxSiteSearch assembly with the new Ingeniux.Search assembly.
  4. Locate the controllers, and update their using directives. There should be no using directives that reference Cartella; for instance, Cartella.Search should be replaced with Ingeniux.Search.
  5. Right-click the solution file on the Solution Explorer, and select Rebuild.

2) Verify configuration files are properly set.

Make sure that Search.config references SearchSource.config, which has been moved from the DSS directory location and now exists in the CMS instance pub folder: \[CMS instance pub folder]\Settings\SearchSource.config. You should verify that the correct values are noted in any other important elements as well.

For [DSS file path]\Search.config:


<?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>
			<add name="defaultIndexingAnalyzer" value="Ingeniux.Search.Analyzers.StemmingIndexingAnalyzer, Ingeniux.Search" />
			<add name="defaultQueryAnalyzer" value="Ingeniux.Search.Analyzers.StemmingQueryAnalyzer, Ingeniux.Search" />
		</Settings>
        <IndexingSources>
            <add name="IntranetCartella"
					 type="Cartella.Search.CartellaSearchSource"
					 settingsFile="App_Data\cartellaSearchSource.config" />
			<add name="IntranetPublicContent"
					 type="Ingeniux.Runtime.DssContentSearchSource"
					 settingsFile="\\intranet\pub\settings\searchSource.config" />
			<add name="SupportPublicContent"
					 type="Ingeniux.Runtime.DssContentSearchSource"
					 settingsFile="\\support\pub\settings\searchSource.config" />
			<add name="IntranetDirectory"
					 type="Cartella.Search.LdapSearchSourceSource"
					 settingsFile="App_Data\ldapSearchSource.config" />-->
        </IndexingSources>
        <SearchProfiles>
            <add name="Intranet">
				<Sources>
					<add name="IntranetCartella" />
					<add name="IntranetPublicContent" />
					<add name="IntranetDirectory" />
				</Sources>
			</add>
        </SearchProfiles>
    </Search>
</configuration>
  • Verify that the path in the Search node points to the LuceneIndex directory.
  • Verify that the path in the IndexingSources node points to the SearchSource.config file within the CMS instance publish folder.

For [DSS file path]\SearchSource.Config:


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="Search" type="Ingeniux.Search.Configuration.IndexingSourceConfig, Ingeniux.Search" />
  </configSections>
  <Search>
    <Settings>
      <add name="documentComponents" value="BinaryDocument" />
    </Settings>
    <DefaultFields >
      <add name="documents" includeInSearchResults="true" boost="2" />
    </DefaultFields>
    <Types />
  </Search>
</configuration>
  • Allowing to index through asset content is set by default and no longer needs to be declared in DefaultFields name. Thus, the old fulltext value no longer needs to be declared.
  • Page names are indexed. By default, name is added as a default field on publish.
  • Performing a publish (either incremental or full) rolls back this configuration file back to its default settings.
  • The BinaryDocument value on the documentComponents node specifies that BinaryDocument components will be indexed. It also attaches the document asset as part of the component's searchable text.

3) Make sure that the Adobe Reader iFilter Package and the Microsoft Office iFilter package are installed on the DSS.

4) Run a full publish and make a backup of the DSS web.config file.

5) Upgrade your DSS instance to DSS 9.0.

6) 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 file to the new file.

7) The final step is dumping the search index. Open IIS and stop the application pool. Then navigate to [DSS directory]\App_Data\LuceneIndex and delete all the files inside it. Restart the application pool.