+

Search Tips   |   Advanced Search

Set the default dictionary


Overview

Use administrative commands to set the default dictionary used for Search query strings.

Use setDefaultDictionary to set the default search dictionary. At indexing time, when content is analyzed, an attempt is made to guess which of the enabled LanguageWare dictionaries should be used when applying the text analysis process. If the attempt is unsuccessful or if the language guessed does not have a corresponding dictionary enabled, the default dictionary is used.

The default dictionary is also used at search time. Language guessing is not used at search time to determine which dictionary is used for text analysis, the language is specified as part of the HTTP request. If there is a problem loading the dictionary corresponding to the language specified or if there is no corresponding dictionary enabled, then the default dictionary is used.


Specify a default dictionary for use with Search

  1. Start wsadmin...

  2. Check out search-config.xml:

      execfile("searchAdmin.py")
      SearchCellConfig.checkOutConfig("working_dir", "cellName")

    To get cell name:

  3. To set the default dictionary:

    SearchCellConfig.setDefaultDictionary(String languageCode)

    Configure the default LanguageWare dictionary used by the Search application. The default dictionary must be one of the enabled dictionaries. This command takes a single argument:

    • languageCode

      Language code for the dictionary to set as the default. This 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.

      A matching dictionary must exist in the list of configured dictionaries for the language specified as a parameter.

    For example:

      SearchCellConfig.setDefaultDictionary("fr")

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

  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