Skip to main content
The decompoundedAttributes parameter defines which attributes should support compound word segmentation, or decompounding, for supported languages. Decompounding splits long compound words—common in Germanic and Scandinavian languages—into individual word components.
For example, the German word "Gartenstühle" is split into "Garten" and "Stühle" so that a query for "Stühle" can match "Gartenstühle".

Usage

  • Attribute names are case-sensitive.
  • The attributes must be included in searchableAttributes.
  • You can define different attributes for different languages.
  • Decompounding is available for:
    • Danish (da)
    • Dutch (nl)
    • Finnish (fi)
    • German (de)
    • Norwegian (no)
    • Swedish (sv)
  • Does not apply to decomposed characters using non-spacing marks. For example, "Gartenstühle" (composed of u + ◌̈) will not be split.

Example

Current API clients

IndexSettings settings = new IndexSettings();
settings.DecompoundedAttributes = new Dictionary>
{
    {"de", new List {"name_de", "description_de"}},
    {"fi", new List {"name_fi", "description_fi"}}
};

index.SetSettings(settings);
IndexSettings settings = new IndexSettings();
settings.DecompoundedAttributes = new Dictionary>
{
    {"de", new List {"name_de", "description_de"}},
    {"fi", new List {"name_fi", "description_fi"}}
};

index.SetSettings(settings);
I