Language Support

Lunr has full support for the indexing and searching of documents in English. If your documents are in another language, you need to install the Lunr Languages plugin to get the best search results. Currently the following languages are supported:

German

Danish

Spanish

Finnish

French

Hungarian

Italian

Japanese

Dutch

Norwegian

Portuguese

Romanian

Russian

Thai

Installing

First, install the lunr-languages package:

$ npm install lunr-languages

Next, load the lunr.stemmer.support plugin and the appropriate language extension, which is identified by the ISO 639-1 language code.

The following example sets up the French language plugin and uses it when defining an index:

Multi-Language Content

If you have documents in more than one language, it is still possible to index them together by combining two or more language extensions using the lunr.multiLanguage plugin, part of lunr-languages package.

The following example sets up an index with support for both English and German: