N-gram and edge_N-gram differences do not work anymore

Created on 4 February 2025, 5 days ago

Problem/Motivation

Unsure when this was added to opensearch but there is now a index level setting index.max_ngram_diff which defaults to 1. this means that arbitrary values for min_gram and max_gram on field level are not working anymore.

index.max_ngram_diff (Integer): The maximum difference between min_gram and max_gram values for the NGramTokenizer and NGramTokenFilter. Default is 1.

https://opensearch.org/docs/latest/install-and-configure/configuring-ope...

Error message is then:

The difference between max_gram and min_gram in NGram Tokenizer must be less than or equal to: 1 but was [11]. This limit can be set by changing the [index.max_ngram_diff] index level setting.

Proposed resolution

Add an index setting and use that on the updateSettings call.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland yobottehg Basel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024