Configuring GSearch


Caution
The following GSearch configuration is only for customers who need to do a quick conversion from Google Search Appliance to InSite Search for their DSS implementations.
To configure GSearch:
  1. Open your DSS project in Visual Studio (VS).
  2. Update to the latest version of InSite Search 2 via the VS NuGet Package Manager.
  3. Rebuild your VS project.
  4. Create a configuration file named GSearchFieldMapping.xml in the \Config folder for your DSS project.
  5. Add the GSearchFieldMapping tag set:
    
                <?xml version="1.0" encoding="UTF-8"?>
    <GSearchFieldMapping enabled="false">
        <Map outputField="T">Title</Map>
        <Map outputField="LANG">Locale</Map>
        <Map outputField="S"></Map>
        <Map outputField="U"></Map>
    </GSearchFieldMapping>
              
    Note
    By default, this file has been included in the service web deploy and NuGet deploy packages.
  6. By default, the @enabled attribute on <GSearchFieldMapping> is set to false, so set it to true to enable GSearch.For example, the <GSearchFieldMapping> element opening tag should look similar to the following code:
    <GSearchFieldMapping enabled="true">
  7. Optional: You can specify a unique field to generate the T element. If this configuration populates Title with a different element in the CMS, you can change which field in the CMS populates Title in the CMS. For example, the <Map> should look similar to the following code:
    <Map outputField="T">Title</Map>
    Note
    When <Map> value is Title and its @outputField value is T, GSearch includes all Title fields. That is, by default, the ISS service that uses GSearch populates Title with the Title element in the CMS. Google populates Title with the Title element of the page.
    Caution
    In most cases, the only <Map> element that may require customization is when @outputField is T. If you plan to change the default values for any of the other <Map> element types, consult with Ingeniux Support prior to your customization.
  8. Save your configuration file to your DSS server.
    Note
    If you save GSearchFieldMapping.xml to the Config folder (e.g., [Drive]:\[path-to-DSS root-directory]\Config\GSearchFieldMapping.xml), then you can skip the next step. You do not need to configure Search.config because the Config folder is the default location of GSearchFieldMapping.xml.
  9. In your DSS project, modify the Search.config to include a new <Settings> tag entry that references GSearchFieldMapping.xml, and save Search.config after the changes are made.
    • Name: GSearchFieldMapping
    • Value: Absolute path to GSearchFieldMapping.xml as it resides on the DSS server after replication (e.g., D:\igxsites\search\GSearchFieldMapping.xml).
    For example, the GSearchFieldMapping should look similar to the following code in 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>
  10. After the initial configuration of GSearchFieldMapping.xml, recycle the DSS application pool so that the system can pick up the location of the new configuration file. All subsequent changes to GSearchFieldMapping.xml will be reflected in search results.