Enable Languages in the Solr Search Engine

User role: System Administrator

The Solr search engine provides out-of-box languages that can be enabled to allow users to search for knowledge documents using key words in those languages. You can enable or disable languages in the Solr search engine that contain a valid "KM Identifier" value.

Note We recommend that you enable only those languages that are applicable to your knowledgebase. By default, English is the only language enabled.

To enable or disable languages in the Solr search engine:

  1. Update the applicable fieldType, field, and copyField language entries in the schemastub.xml file.
    1. Locate the schemastub.xml file in the Service Manager home directory.
      1. In the Windows client, the default directory is: C:\Program Files\Micro Focus\Service Manager x.xx
      2. In the Linux environment, the install path is: /apps/smxxx/
      3. Once you locate the Service Manager home directory, the path to the schemastub.xml file is: /Server/RUN/km/styles/schemastub.xml

    2. In the schemastub.xml file, find the reference for the language fieldType you want to enable (for example, text_zh for the Chinese language) and uncomment the entry.

      Note: The following XML comment tags start and end (surround) the language entry:
      <!--<fieldType> and </fieldType>-->

      Following is an example of the Chinese language entry:

      <!-- CHINESE SIMPLIFIED/TRADITIONAL -->

      <!-- <fieldType name="text_zh" class="solr.TextField" positionIncrementGap="100">

      <analyzer type="index">

      <tokenizer class="com.teragram.solr.AsianTaggingTokenizerFactory" filename="../../kmsearchengine/languages/data/zh.uhtagger" />

      </analyzer>

      <analyzer type="query">

      <tokenizer class="com.teragram.solr.AsianTaggingTokenizerFactory" filename="../../kmsearchengine/languages/data/zh.uhtagger" />

      <filter class="solr.SynonymFilterFactory" synonyms="../../../languages/thesaurus/synonyms_zh.txt"/>

      </analyzer>

      </fieldType>

      -->

    3. Locate the solr field section to uncomment the applicable fields. You will see a list of language-specific docbody and adlearn fields (except docbody, docbody_en, adlearn, and adlearn_en will be commented).

    4. Uncomment the applicable language field entry.

      Note: Do not comment out the default docbody and adlearn fields. By default, the docbody_en and adlearn_en fields are enabled. You may safely comment them out if your system does not require English language processing.
      For Example:
      <!-- <field name="docbody_zh" type="text_zh" indexed="true" stored="true" multiValued="true"/> -->

      <!-- <field name="attachment_zh" type="text_zh" indexed="true" stored="true" multiValued="true"/> -->

      <!-- <field name="adlearn_zh" type="text_zh" indexed="true" stored="true" multiValued="true"/> -->

    5. Uncomment the applicable language copyField entry.

      Important: The three field entries (fieldType, field, and copyField) must match (you must uncomment all three fields to enable the language).

      For example:
      <!-- <copyField source="docbody_zh" dest="docbody"/> -->

      <!-- copyField source="attachment_zh" dest="attachment"/ -->

    6. Save your changes.
  2. Update the Database Manager files.
    1. Click Tailoring > Database Manager.
    2. In the Table field, type language and then click Search.
    3. Double-click the language form and click Search. A list of language identification records is displayed.
    4. Select the applicable language identification record. For this example, there are two records: Chinese Simplified (zh-Hans) and Chinese Traditional (zh-Hant). The record is displayed.
    5. Select the Active for Knowledge Management field to make the language available for Knowledge Management.

      Note: The Service Manager Language table may contain language entries that are not supported by the search engine. Only languages with a valid KM Identifier value should be enabled.
    6. Click Save and OK. Your language should now be available in the locale dropdown on the Advanced Search screen, Contribute Knowledge screens, and for the default locale dropdown on the Manage Knowledgebases Type Information tab.
  3. To disable a language that is no longer being used, do the following:
    1. Locate and comment the following entries in the schemastub.xml file:
      fieldType, field, and copyField

      Important: The three field entries (fieldType, field, and copyField) must match (you must comment all three field entries to disable the language).
    2. Save your changes.
    3. Go to the Database Manager identification record and uncheck the Active for Knowledge Management field to make the language unavailable for Knowledge Management.
    4. Save your changes.