Configuring the Spellchecker Index


When configured, Spellchecker suggests alternatives for users who have executed searches. These alternatives are derived from a word list file, from CMS taxonomy categories, and/or from content index terms.
To set up an independent index for Spellchecker queries:
  1. Navigate to [Drive]:\[path-to-DSS-root-directory], 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>
  2. On the <Search> element, complete the following steps.
    1. Ensure the @indexLocation attribute value points to the luceneIndex folder, which stores your main content index.
    2. Set the @indexingEnabled attribute value to true.
    Your code should look similar to the following example:
    <Search indexLocation="App_Data\luceneindex" indexingEnabled="true">
  3. If an <add> element doesn't already exist for search suggest 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.SpellCheckerSearchDocumentSource as the value of @type.
    3. Enter the filepath to SpellcheckerSource.config for the value of the @settingsFile attribute value.
      Note
      You can use a relative path to the default Suggest Search configuration file (i.e., App_Data\SpellcheckerSource.config), which is included during installation.
    For example, your search suggest <add> element and attributes should look similar to the following code:
    <add name="SpellCheckDictionary" type="Ingeniux.Search.SpellCheckerSearchDocumentSource"
    settingsFile="App_Data\spellcheckerSource.config"/>
  4. Save and close Search.config.
  5. Navigate to SpellcheckerSource.config, and open the file in a text editor.The example below displays generic code contained within SpellcheckerSource.config.
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="Search" type="Ingeniux.Search.Configuration.SpellCheckerSourceConfig, Ingeniux.Search" />
        </configSections>
        <Search indexLocation="App_Data\Spellchecker_Index">
            <Settings>
                <add name="IncludeContentIndexTerms" value="true" />
            </Settings>
            <Dictionaries>
                <add name="short" value="C:\ancillary-resources\words.txt" />
            </Dictionaries>
            <Taxonomies>
                <add name="eduTax" value="C:\igxdss\dss-published-content\taxonomytree.xml" />
            </Taxonomies>
        </Search>
    </configuration>       
  6. Locate the <Search> tag, and enter the filepath to the Spellchecker index files as the value of the @indexLocation attribute.
    Note
    The default value is App_Data\Spellchecker_Index.
    For example, the <Search> element opening tag should look similar to the following code:
    <Search indexLocation="App_Data\Spellchecker_Index">
  7. Optional: You can enable the Spellcheck dictionary construction using terms from the main index. Locate the <add> element within <Settings> and set the following attribute values:
    1. Enter IncludeContentIndexTerms in the @name attribute.
    2. Enter true in the @value element. The default is false.
      Note
      This option indexes all terms from the main index for the spellchecking index, thus providing the possibility of spellcheck-assisted searches. Depending on the amount of documents and terms in the main content index, enabling this option may increase indexing time. Also, after you configure this option, you must re-index all associated indexes.
      For example, the <add> element should look similar to the following code:
      <Settings>
          <add name="IncludeContentIndexTerms" value="true" />
      </Settings>
  8. Locate the <add> element within the <Dictionaries> element and set the following attributes:
    1. Enter an arbitrary, unique name in the @name attribute.
    2. In the @value attribute, enter the filepath to the plain text file of properly spelled words For example, the <add> element should look similar to the following code:
      <Dictionaries>
          <add name="ShortDictionary" value="[Drive]:\ancillary-resources\words.txt" />
      </Dictionaries>
  9. Locate the <add> element within the <Taxonomies> element and set the following attributes:
    1. Enter an arbitrary, unique name in the @name attribute.
    2. Enter the filepath to the TaxonomyTree.xml (the published folder within the DSS folder structure contains this file) in the @value attribute.
    For example, the <add> element should look similar to the following code:
    <Taxonomies>
        <add name="eduTax" value="[Drive]:\[path-to-DSS-directory]\dss-published-content\taxonomytree.xml" />
    </Taxonomies>
  10. Save and close SpellcheckerSource.config.