Configuring the Analytics Index

This configuration file helps to track users' search activity so that it can be re-purposed in a meaningful way.

For example, if users search for a term repeatedly and if this term has not been indexed, then you can add content to link to the search term. Alternatively, after data mining a particular search behavior, you can help future users to find terms within pages that are associated with the search term: "Because you have searched for term X, you may also be interested in terms A, B, and C."

To set up an independent index for Analytics queries:
  1. Navigate to [Drive]:\[path-to-DSS-root-directory], and open Search.config in a text editor.
    Search.config acts as a hub for all InSite Search configurations and must be configured before configuring KeymatchSource.config.
    The example below displays generic code contained within Search.config.
    <?xml version="1.0"?>
            <section name="Search"
                type="Ingeniux.Search.Configuration.IndexingConfiguration, Ingeniux.Search"/>
        <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;"/>
                <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"
                <add name="GSearchFieldMapping"
                    value="[Drive]:\[path to DSS root directory]\[subfolder(s)]\GSearchFieldMapping.xml"/>
                <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"
                <add name="SpellCheckDictionary" type="Ingeniux.Search.SpellCheckerSearchDocumentSource"
                <add name="SiteCrawlerSource" type="Ingeniux.Search.HtmlSiteSource"
                <add name="Analytics" type="Ingeniux.Search.AnalyticsSearchDocumentSource"
                <add name="Independent-search-profile-1">
                        <add name="KeyMatch"/>
                        <add name="SpellCheckDictionary"/>
                        <add name="analytics"/>
  2. If an <add> element doesn't already exist for analytics within the <IndexingSources> element, create one. Complete the following steps in the <add>element:
    1. Enter an arbitrary, unique name as the value of the @name attribute for identification purposes.
    2. Enter Ingeniux.Search.AnalyticsSearchDocumentSource as the value of @type attribute.
    3. Enter the filepath to AnalyticSource.config for the value of the @settingsFile attribute.
      You can use a relative path to the default Keymatch configuration file (i.e., App_Data\AnalyticSource.config), which is included during installation.
    For example, your analytics<add> element and attributes should look similar to the following code:
    <add name="Analytics" type="Ingeniux.Search.AnalyticsSearchDocumentSource"
  3. Save and close Search.config.
  4. Navigate to [Drive]:\[path-to-DSS-root-directory]\App_Data, and open AnalyticSource.config in a text editor.The example below displays generic code contained within AnalyticSource.config.
    <?xml version="1.0" encoding="utf-8"?>
    		<section name="Search" type="Ingeniux.Search.Configuration.IndependentIndexingSourceConfig, Ingeniux.Search" />
    	<Search indexLocation="App_Data\Index_Analytics">
    			<!-- tracking cycles are
    			<add name="trackingCycle" value="year" />
    			<!-- BatchPeriod in seconds -->
    			<add name="batchPeriod" value="300" />
  5. Locate the <Search> element, and enter the filepath to the analytics index files as the value of the @indexLocation atttribute.
    The default value is App_Data\Index_Analytics.
    For example, the <Search> element opening tag should look similar to the following code:
    <Search indexLocation="App_Data\Index_Analytics">
  6. Locate the <Settings> element, then set the following <add> name/value pairs:
    1. Locate the<add> element with trackingCycle as the @name attribute value. In the @value attribute, enter the cycle of saving results to index.
      The default value is year.
    2. Locate the<add> element with batchPeriod as the @name attribute value. In the @value attribute, enter the interval at which results are saved (in seconds).
      The default value is 300, which is five minutes.
  7. Save and close AnalyticSource.config.