queryLanguages
[]
      'queryLanguages' => ['language ISO code', ...]
    Can be used in these methods:
    
        
          search,
        
        
          setSettings,
        
        
          browseObjects,
        
        
          searchForFacetValues,
        
        
          generateSecuredApiKey,
        
        
          addApiKey,
        
        
          updateApiKey
        
        
          search,
        
        
          set_settings,
        
        
          browse_objects,
        
        
          search_for_facet_values,
        
        
          generate_secured_api_key,
        
        
          add_api_key,
        
        
          update_api_key
        
        
          search,
        
        
          setSettings,
        
        
          browseObjects,
        
        
          searchForFacetValues,
        
        
          generateSecuredApiKey,
        
        
          addApiKey,
        
        
          updateApiKey
        
        
          search,
        
        
          set_settings,
        
        
          browse_objects,
        
        
          search_for_facet_values,
        
        
          generate_secured_api_key,
        
        
          add_api_key,
        
        
          update_api_key
        
        
          search,
        
        
          setSettings,
        
        
          browse,
        
        
          searchForFacetValues,
        
        
          generateSecuredApiKey,
        
        
          addAPIKey,
        
        
          updateAPIKey
        
        
          search,
        
        
          setSettings,
        
        
          browseObjects,
        
        
          searchForFacetValues,
        
        
          generateSecuredApiKey,
        
        
          addApiKey,
        
        
          updateApiKey
        
        
          Search,
        
        
          SetSettings,
        
        
          Browse,
        
        
          SearchForFacetValues,
        
        
          GenerateSecuredApiKey,
        
        
          AddApiKey,
        
        
          UpdateApiKey
        
        
          Search,
        
        
          setSettings,
        
        
          browse,
        
        
          searchForFacetValues,
        
        
          generateSecuredApiKey,
        
        
          addApiKey,
        
        
          updateApiKey
        
        
          Search,
        
        
          SetSettings,
        
        
          BrowseObjects,
        
        
          SearchForFacetValues,
        
        
          GenerateSecuredAPIKey,
        
        
          AddAPIKey,
        
        
          UpdateAPIKey
        
        
          search,
        
        
          setSettings,
        
        
          browse index,
        
        
          search into facet values,
        
        
          generateSecuredApiKey,
        
        
          add key,
        
        
          update key
        
  
About this parameter
Sets languages for language-specific settings such as plurals, stop words, and dictionaries for detecting words in CJK languages.
queryLanguages sets:
- A default list of languages used by 
removeStopWordsandignorePlurals(if they’re enabled). For example, if you enableignorePlurals, the engine will apply the languages set inqueryLanguages. - Sets the dictionary for word-detecting in CJK languages (=Chinese “zh”, Japanese “ja”, or Korean “ko”). For this, you must place the CJK language first in queryLanguages’ list of languages. For example, to ensure that Chinese word recognition is based on a Chinese dictionary and not the general algorithm used for all languages, you must place Chinese in the first position of the list of languages. Likewise, Japanese and Korean must be first in the list to ensure proper dictionary-based parsing.
 
Usage notes
- When working with Japanese data, you must also set “ja” in the 
indexLanguagesparameter. queryLanguagescreates a default list of languages. This default can be overridden by any setting that uses the default. For example, if you set the default to English and French, you can setignorePluralsto use the default but setremoveStopWordsto recognize only English stop words.- For optimum relevance, it’s recommended that you only enable languages used in your data.
 
You should always set queryLanguages and indexLanguages for your indices. If you don’t, the engine uses either the default (all supported languages) or the list of languages specified in ignorePlurals and removeStopWords.
This can lead to unexpected search results.
List of supported languages
| 
         Afrikaans= 
        afArabic= 
        arAzeri= 
        azBulgarian= 
        bgBengali= 
        bnCatalan= 
        caCzech= 
        csWelsh= 
        cyDanish= 
        daGerman= 
        deGreek= 
        elEnglish= 
        enEsperanto= 
        eoSpanish= 
        esEstonian= 
        etBasque= 
        euPersian (Farsi)= 
        faFinnish= 
        fiFaroese= 
        foFrench= 
        frIrish= 
        gaGalician= 
        glHebrew= 
    he | 
    
         Hindi= 
        hiHungarian= 
        huArmenian= 
        hyIndonesian= 
        idIcelandic= 
        isItalian= 
        itJapanese= 
        jaGeorgian= 
        kaKazakh= 
        kkKorean= 
        koKurdish= 
        kuKirghiz= 
        kyLithuanian= 
        ltLatvian= 
        lvMaori= 
        miMongolian= 
        mnMarathi= 
        mrMalay= 
        msMaltese= 
        mtNorwegian Bokmål= 
        nbDutch= 
        nlNorwegian= 
        noNorthern Sotho= 
    ns | 
    
         Polish= 
        plPashto= 
        psPortuguese= 
        ptBrazilian= 
        pt-brQuechua= 
        quRomanian= 
        roRussian= 
        ruSlovak= 
        skAlbanian= 
        sqSwedish= 
        svSwahili= 
        swTamil= 
        taTelugu= 
        teThai= 
        thTagalog= 
        tlTswana= 
        tnTurkish= 
        trTatar= 
        ttUkranian= 
        ukUrdu= 
        urUzbek= 
        uzChinese= 
    zh | 
  
Examples
Set the default query languages
In this example, Spanish (‘es’) is set as the default language for both ignorePlurals and removeStopWords
1
2
3
4
5
$index->setSettings([
  'queryLanguages' => ['es'],
  'removeStopWords' => true,
  'ignorePlurals' => true
]);
      Override query languages
In this example, the Spanish default for removeStopWords is overridden by adding Catalan (‘ca’) to its list of languages.
1
2
3
$results = $index->search('query', [
  'removeStopWords' => ['ca', 'es']
]);
      Set the correct dictionary for word detection
Placing ‘ja’ in the first position ensures that the Japanese dictionary will be used whenever the engine detects CJK logograms.
1
2
3
$results = $index->search('query', [
  'queryLanguages' => ['ja', 'en']
]);