的
min_similarity是零和一之间的值。从Lucene文档中:
For example, for a minimumSimilarity of 0.5 a term of the same length as the query term is considered similar to the query term if the edit distance between both terms is less than length(term)*0.5
所谓的“编辑距离”是Levenshtein距离。
该查询在内部工作的方式是:
- 当考虑
min_similarity
到时,它将查找索引中存在的所有可能与搜索词匹配的词 - 然后搜索所有这些术语。
您可以想象此查询可能有多繁重!
为了解决这个问题,您可以设置
max_expansions参数以指定应考虑的最大匹配词数。



