Enable dictionaries 

Use administrative commands to enable the dictionaries that you want to use with Search.


Before starting

When using administrative commands, use the IBM WAS wsadmin client. See Starting the wsadmin client for details.

Note: Enable 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.


About this task

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.


Procedure

To enable dictionaries for use with Search...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("searchAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Check out the Search cell-level configuration file using the following command:

      SearchCellConfig.checkOutConfig("<working_dir>", "<cellName>")

      where:

      • <working_dir> is the temporary directory to which you want to check out the cell level configuration file. This directory must exist on the server where you are running the wsadmin client. Use forward slashes to separate directories in the file path, even if you are using the Microsoft Windows operating system.

          Note: AIX and Linux only: The directory must grant write permissions or the command will not run successfully.

      • <cellName> is the name of the cell that the Search node belongs to. This argument is required. It is also case-sensitive, so type it with care. If you do not know the cell name, you can determine it by typing the following command in the wsadmin command processor:

          print AdminControl.getCell()

      For example:

      SearchCellConfig.checkOutConfig("c:/search_temp", "SearchServerNode01Cell")

  3. To add a specified dictionary to the list of configured dictionaries, use the following command:

      SearchCellConfig.enableDictionary(String languageCode, String dictionaryPath)

        Enables support for the specified LanguageWare dictionary.

        This command accepts two arguments.

        • languageCode. The language code for the dictionary that you want to add. This argument is a string value.

            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 a hyphen. For example, Portuguese has two variants, one for Portugal (pt-PT) and one for Brazil (pt-BR).

        • dictionaryPath. The path to the directory containing the dictionary file. This argument is a string value.

        For example:

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

        You can also specify the path using a WebSphere environment variable. In the following example, the "${SEARCH_DICTIONARY_DIR}" value is used to point to the shared Search dictionary directory:

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

        Or, if you are using a shared-file system on Microsoft Windows, you can specify the file path to a network share directory using the Universal Naming Convention (UNC) format:

        SearchCellConfig.enableDictionary("fr","\\enterprise.server\LotusConnections\data\shared\search\dictionary")

  4. Check in the changed configuration property keys using the following wsadmin client command:

      SearchCellConfig.checkInConfig()

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

  6. Stop the server or servers hosting the Search application, delete the index, and then restart the Search servers.

      The next time the scheduled task runs, it recreates the index.


Parent topic

Configure dictionaries for Search


Related tasks


Enable users to set a language preference
Listing enabled dictionaries
Setting the default dictionary
Disable dictionaries

Related reference
SearchCellConfig commands
Search language dictionaries

+

Search Tips   |   Advanced Search