Query_string query with fuzzy matching enabled without explicit `~` operators

With query_string for queries, a user can use operators like AND and OR. However, if they are searching for the term bill and type in bil as a search term, they don't find anything (the field uses a standard analyzer).

The query_string query can of course be written as bil~ but a) this only helps if the user knows about this capability, and b) it assumes this isn't just a spelling mistake.

One option is to use a term suggester to detect the issue and provide the correction, however I was also thinking about applying "fuzziness by default" to all the terms. Are there good reasons not to do this?

Also, as far as I can tell, a fuzziness-by-default approach requires parsing the query, modifying the resulting data structure to include the fuzziness operator on each term, and then reformulating that as an ES search. Are there libraries people are using to parse query strings? I see this SO answer https://stackoverflow.com/a/52100519/430128 which refers to the EBNF grammer used to parse the query string.

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