Configuring Search.config


Search.config defines the location of main content index files, which outputs to a single location on disk. Ingeniux Search queries the main content index.

Note
If you upgraded your site to CMS 10.x and need to re-establish ISS, see Implementing InSite Search After Site Upgrade for details about upgrading Search.config.

To configure Search.config for the main content index:
  1. Open your DSS solution in Visual Studio.
  2. Right-click the solution file (i.e., the top node) in the Solution Explorer view, and select Rebuild.
  3. Navigate to [Drive]:\[path-to-DSS-root-folder], and open Search.config in a text editor. The example below displays generic code contained within Search.config.
    <?xml version="1.0"?>
    <configuration>
        <configSections>
            <section name="Search"
                type="Ingeniux.Search.Configuration.IndexingConfiguration, Ingeniux.Search"/>
        </configSections>
        <Search indexLocation="App_Data\LuceneIndex"
            synonymslocation="[Drive]:\[path to DSS root directory]\published\iss-config\Synonyms.xml"
            indexingEnabled="true" queryMaxClauses="1024">
            <Hiliter startTag="&lt;strong&gt;" endTag="&lt;/strong&gt;"/>
            <Settings>
                <add name="defaultIndexingAnalyzer"
                    value="Ingeniux.Search.Analyzers.StemmingIndexingAnalyzer, Ingeniux.Search"/>
                <add name="defaultQueryAnalyzer"
                    value="Ingeniux.Search.Analyzers.StemmingQueryAnalyzer, Ingeniux.Search"/>
                <add name="QueryFieldsFileLocation"
                    value="[Drive]:\[path to DSS root directory]\[subfolder(s)]\QueryFields.xml"/>
                <add name="DocumentBoostByFacetsFileLocation"
                    value="App_Data\DocumentBoostByFacetsFileLocation.xml"/>
                <add name="GSearchFieldMapping"
                    value="[Drive]:\[path to DSS root directory]\[subfolder(s)]\GSearchFieldMapping.xml"/>
            </Settings>
            <IndexingSources>
                <add name="CMSPublishedContent" type="Ingeniux.Runtime.Search.DssContentSearchSource"
                    settingsFile="[Drive]:\[path to DSS root directory]\settings\SearchSource.config"/>
                <add name="KeyMatch" type="Ingeniux.Search.KeyMatchSearchDocumentSource"
                    settingsFile="App_Data\KeymatchSource.config"/>
                <add name="SpellCheckDictionary" type="Ingeniux.Search.SpellCheckerSearchDocumentSource"
                    settingsFile="App_Data\spellcheckerSource.config"/>
                <add name="SiteCrawlerSource" type="Ingeniux.Search.HtmlSiteSource"
                    settingsFile="App_Data\sitecrawlerSource.config"/>
                <add name="Analytics" type="Ingeniux.Search.AnalyticsSearchDocumentSource"
                    settingsFile="App_Data\analyticSource.config"/>        
            </IndexingSources>
            <SearchProfiles>
                <add name="Independent-search-profile-1">
                    <Sources>
                        <add name="KeyMatch"/>
                        <add name="SpellCheckDictionary"/>
                        <add name="analytics"/>
                    </Sources>
                </add>
            </SearchProfiles>
        </Search>
    </configuration>
  4. On the <Search> element, complete the following steps.
    1. Ensure the <Search> element's @indexLocation attribute points to the luceneindex folder, where your main content index will be stored.
    2. Set the @indexingEnabled attribute on the <Search > element to true.
    Your code should look similar to the following example:
    <Search indexLocation="App_Data\LuceneIndex" indexingEnabled="true">
  5. On the <add> element, complete the following steps:
    1. Enter an arbitrary, unique name as the @name attribute value.
    2. Enter Ingeniux.Runtime.Search.DssContentSearchSource as the @type attribute value.
      Note
      Queries that run against this library type require that the content published from an Ingeniux CMS be used by an Ingeniux DSS.
    3. Enter an absolute path to SearchSource.config as the @settingsFile attribute value.
      Important
      Verify the validity of the DSS directory filepath to SearchSource.config in the <IndexingSources> element. A basic SearchSource.config file resides in [Drive]:\[path-to-DSS-root-folder]\[directory-containing-published-content]\settings. This file generates on publish of CMS content to the publishing content's Settings folder (e.g., [Drive]:\[path-to-cms-site-instance]\site\App_Data\pub\[publishing-target-name]\settings\SearchSource.config).

    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>
  6. Save and close Search.config.