Show TOC

 Defining the Search LanguagesLocate this document in the navigation structure

Use

In the configuration of the default search dialog box, you can define whether or not users can choose more than one language in the search options to perform a search with. This allows you to narrow down the hits in the search results list to specific languages.

Prerequisites

The search_language component is used for this function. This is entered in the KM configuration at Content Management → User Interface → Mapping → Search Dialog Box Component. It is based on the com.sapportals.wcm.control.search.SearchLanguageControl Java class.

Procedure

To be able to restrict the search results to certain languages using the search options, you must work through the following configuration steps:

  1. Enter the search_language component in the search component set used.

    Open the configuration of the Default Search Dialog Box . In the KM configuration, choose Content Management → User Interface → Search → Default Search Dialog Box. Open the search component set entered and enter the search_language component in the Component for Search Options parameter or alternatively in the Component Below Search Optionsparameter (see Search Components ).

  2. Choose the default language in the search options set.

    Open the configuration of the default search dialog box. In the KM configuration, choose Content Management → User Interface → Search → Default Search Dialog Box. Open the search options set entered (see Search Options ). Deactivate the Enable Language Selection parameter. In the Default Search Language Selection parameter, you can choose which language you want to appear as the default in the search options. Choose ALL if you want all languages that are configured for TREX to be taken into account during searches. If you choose an individual language, the system also takes into account the logon language of the portal in the search options.

    Note

    TREX may incorrectly classify documents that are written in one language, for example, English, but contain many words from another language, for example, Italian, in a different language index. One example might be the menu of an Italian restaurant in New York, which is written in English but contains many Italian dishes/words.

    You can use the langPropId custom property to prevent the incorrect classification of critical documents. Users can use a predefined property to determine the language/language index into which the document in question is to be indexed (see Creating an Index ). The list of permitted languages is entered in the configuration of the index management service (see Index Management Service ).

Result

In the search options, users now see the languages that they can search for. The default settings are the portal logon language of the current user and the language(s) that you, as the administrator, specified in the search options set used. Users can change the default languages for each search.