SOLR-1302 -- Fixing infinite norm calculation

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@911153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2010-02-17 19:26:11 +00:00
parent f037de128c
commit d85bb64392
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ public class DistanceUtils {
result = Math.sqrt(squaredEuclideanDistance(vec1, vec2));
} else if (power == Integer.MAX_VALUE || Double.isInfinite(power)) {//infininte norm?
for (int i = 0; i < vec1.length; i++) {
result = Math.max(vec1[i], vec2[i]);
result = Math.max(result, Math.max(vec1[i], vec2[i]));
}
} else {
for (int i = 0; i < vec1.length; i++) {