Skip to main content
Version: User Guides (BYOC)

Stemmer
Public Preview

The stemmer filter reduces words to their base or root form (known as stemming), making it easier to match words with similar meanings across different inflections. The stemmer filter supports multiple languages, allowing for effective search and indexing in various linguistic contexts.

Configuration

The stemmer filter is a custom filter in Zilliz Cloud. To use it, specify "type": "stemmer" in the filter configuration, along with a language parameter to select the desired language for stemming.

analyzer_params = {
"tokenizer": "standard",
"filter":[{
"type": "stemmer", # Specifies the filter type as stemmer
"language": "english", # Sets the language for stemming to English
}],
}

The stemmer filter accepts the following configurable parameters.

Parameter

Description

language

Specifies the language for the stemming process. Supported languages include: "arabic", "danish", "dutch", "english", "finnish", "french", "german", "greek", "hungarian", "italian", "norwegian", "portuguese", "romanian", "russian", "spanish", "swedish", "tamil", "turkish"

The stemmer filter operates on the terms generated by the tokenizer, so it must be used in combination with a tokenizer. For a list of tokenizers available in Zilliz Cloud, refer to Tokenizer Reference.

After defining analyzer_params, you can apply them to a VARCHAR field when defining a collection schema. This allows Zilliz Cloud to process the text in that field using the specified analyzer for efficient tokenization and filtering. For details, refer to Example use.

Example output

Here’s an example of how the stemmer filter processes text:

Original text:

"running runs looked ran runner"

Expected output (with language: "english"):

["run", "run", "look", "ran", "runner"]