+

Search Tips   |   Advanced Search

Enable dictionaries


Overview

Use administrative commands to enable the dictionaries to use with Search.

Enabling additional dictionaries adds a performance cost at indexing time and will increase the size of the index. Additional dictionaries should only be enabled as needed.

The Search application provides globalization support by using different dictionary files for different languages. Each dictionary file must be enabled in the Search configuration file before indexing. The dictionaries that are enabled in the Search configuration file are loaded into memory at server start time when the Search application is started.


Enable dictionaries for use with Search

  1. Start wsadmin...

  2. Check out search-config.xml :

      execfile("searchAdmin.py")
      SearchCellConfig.checkOutConfig("/tmp", "cellName")

    To get cellName:

  3. To add a specified dictionary to the list of configured dictionaries:

    SearchCellConfig.enableDictionary(String languageCode, String dictionaryPath)

    Enable support for the specified LanguageWare dictionary. This command accepts two arguments.

    • languageCode

      The language code for the dictionary to add. The language code typically comprises two letters conforming to the ISO standard 639-1:2002 that identifies the primary language of the dictionary. However, there are some codes that additionally define a country or variant, in which case these constituent parts are separated by an underscore. For example, Portuguese has two variants, one for Portugal (pt_PT) and one for Brazil (pt_BR). When using a code that also specifies a country, use an underscore to separate the language code and the country code rather than a hyphen; otherwise an error will be generated.

    • dictionaryPath

      The path to the directory containing the dictionary file.

      For example:

        SearchCellConfig.enableDictionary("fr","/opt/IBM/Connections/data/shared/search/dictionary")

      We can specify the path using a WebSphere environment variable. For example...

        SearchCellConfig.enableDictionary("fr","${SEARCH_DICTIONARY_DIR}")

  4. Check in the updated search-config.xml configuration file...

      SearchCellConfig.checkInConfig()

  5. To exit the wsadmin client, type exit at the prompt.

  6. Stop the server or servers hosting the Search application, and then restart the Search servers. The next time the scheduled task runs, persisted seedlists are retained after indexing finishes.


Parent topic:
Configure dictionaries for Search


Related:
List enabled dictionaries
Disable dictionaries
Search language dictionaries