Is there a way to make the query string fuzzy by default?

I submit a query string via Java Rest API (QueryStringQueryBuilder). Right now I pass in whatever the user enters and use that as my query string however I would like to automatically apply fuzzy searching, when it makes sense (non-literal, non-wildcarded searches). So that way when users search for "Exampel" it will apply fuzzy searching without them needing to use the '~' character to request a fuzzy search. Is there a way to do this today with the API or would I need to intercept the search string and apply it internally?

There is a fuzziness parameter on Query string query | Elasticsearch Guide [8.8] | Elastic.

You should probably use that. I'd recommending setting it to "AUTO".

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.