How to set the max_ngram_diff?

There’s any way to set max_ngram_diff using hibernate search? I can set it using the elastic search REST API but if I do that before reindexing it is deleted on reindexing and If I do that after the indexing It’s too late…

There will be a way, but in Hibernate Search 6.1. See https://hibernate.atlassian.net/browse/HSEARCH-3934

In the meantime, your best bet is to use index templates so that your setting is applied automatically when Hibernate Search creates the index.