nitc :: ModelIndex :: find_by_similarity
name
and both the mentity name and full name
# Rank all mentities by the distance between `name` and both the mentity name and full name
fun find_by_similarity(name: String, filter: nullable ModelFilter): IndexMatches do
var results = new IndexMatches
results.add_all find_by_full_name_similarity(name, filter)
results.add_all find_by_name_similarity(name, filter)
return results
end
src/model/model_index.nit:393,2--399,4