minRelevanceScore is a double. cosineSimilarity returns a float. minRelevanceScore should also be a float. At a minimum, the code that casts the double cosineSimilarity to a float should bound the cast to Float.MAX_VALUE.
minRelevanceScore is a double. cosineSimilarity returns a float. minRelevanceScore should also be a float.
At a minimum, the code that casts the double cosineSimilarity to a float should bound the cast to Float.MAX_VALUE.