Configuring Indexing Sources


The primary functions of the Search.config file is to configure indexing behavior, to add index types by defining indexing sources, and to set other InSite Search configurations. It's important to note that there are two types of indexing libraries that can be defined within InSite Search:

  • The Main Content Index is the index that stores page content from either a published CMS site or a site crawl indexing source. You can add multiple instances of each type of indexing source, but the resulting content is always stored in the defined indexLocation value (see below).
  • Independent Indexes comprise of supplemental data that can be used on top of the Main Content Index to enhance data results. Each independent index is stored in their own index location path on disk, as defined in each of their own separate configuration files.

To configure Search.config:

  1. Navigate to the Search.config file. Search.config lives in the root of the DSS project.
  2. Open this file in a text editor.
    <?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>
    
  3. Locate the Search element opening tag, then set the appropriate values for the following attributes:
    • indexLocation: This is a path to the Lucene index files to be written to disk. Its default value is App_Data\LuceneIndex.
    • indexingEnabled: If true, then Lucene indexing is enabled.
    • queryMaxClauses: This integer value determines the maximum size of the returned result set. This is a setting that is used for performance tweaks, mainly for sites with large result return sets.
  4. Locate IndexingSources elemnt block, then create a new "add" tag and modify their associated attributes for each new indexing source:
    • type: Search index class name.
      Note: Search.config must have at least one main content index configured. Refer to the Index Classes table below for values.*
    • name: Any arbitrary, unique name to label the indexing source.
    • settingsFile: Path to source configuration file. The settingsFile value must use an absolute path to searchSource.config.
  5. When you are finished, save Search.config.

At this point, you will need to do an initial browse of your DSS site to initate indexing, provided the each indexing source has a valid settings file configured.

For an explanation on each Index Library Type's setting file configuration, see here.

*Index Classes

Index Library Class Index Type Notes
Ingeniux.Runtime.DssContentSearchSource

Main

For CMS content to be indexed. Note: This is expected to be XML to be rendered via DSS; it is not intended for Multi-Format Output published content.
Ingeniux.Search.HtmlSiteSource Main Used for web crawling a URL endpoint in the similar way as a traditional webcrawler.
Ingeniux.Search.AnalyticsSearchDocumentSource Independent When enabled, creates a separate index that tracks queries made to the InSite Search instance.
Ingeniux.Search.KeyMatchSearchDocumentSource Independent Creates an index used for Keymatch functionality. The index is based on a list of keywords to be fed into the index.
Ingeniux.Search.SpellCheckerSearchDocumentSource Independent Index used for search suggest functionality. A list of terms needs to be provided for this index to populate.