Orama supports stemming to optimize queries and save indexing space. To enable stemming, you must configure the tokenizer within your schema to include stemming: true, the specific stemmer function, and the language constant imported from the corresponding language package (e.g., @orama/stemmers/italian).
Note: Chinese (Mandarin) and Japanese are not supported via stemming; they require dedicated tokenizers (@orama/tokenizers) and stop-word removal (@orama/stopwords).
import { create } from '@orama/orama'
import { stemmer, language } from '@orama/stemmers/italian'
const db = create({
schema: {
components: {
tokenizer: {
stemming: true,
stemmer,
language
}
}
})