Fuzzy_terms_exception when matching against keyword fields


I'm getting a
ElasticsearchException[Elasticsearch exception [type=fuzzy_terms_exception, reason=Term too complex
when running a fuzzy (AUTO) multi match query with a query String that contains long terms against a keyword field. I identified the same problem for other non-keyword fields as well, which I was able to solve by adding a truncate filter to those fields. However, the truncate filter can't be applied to keywords. I saw that one can specify a custom analyzer in the search request, which could do the truncation, but I think this is not what I should do as there are several other fields in my indices with custom analyzers.

I also saw that one can configure the fuzziness per term length, but only to increase the fuzziness at certain lengths. In my case, I actually want to decrease the fuzziness after a certain term length.

Is there some other way to make ES truncate the terms of the search query for keyword fields?
I'm also using a quite old ES version 7.10.2, but AFAIK the truncate filter also can't be applied to keywords in the newest ES version.

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