This content is archived. See latest version here.

Last updated: Sep 21 2015

Introduction

When an index is set up you have the ability to choose a number of languages that it should support. Searching in one of these languages using the Client class and the Search extension method is straight forward. Simply pass the Search extension method an instance of the Language class.

Examples

An instance for each supported language is exposed as a static property on the Language class.

C#
client.Search<BlogPost>(Language.Swedish)
    .For("turtles")
    .InField(x => x.Title);

Note that the language parameter only makes a difference when specifying one or multiple fields to search in. When searching without specifying any field the search is made over the special _all field which only supports a single analyzer. Likewise, when searching in attachments (Word documents, PDFs etc) the standard analyzer is used.

Searching in a specific language means that the search is performed using stemming adapted for that language.

Comments