LongSet ts = LongUtils.setUnion(vec1.keySet(),vec2.keySet());
MutableSparseVector v1 = MutableSparseVector.create(ts);
v1.fill(0);
v1.set(vec1);
v1.multiply(1.0 / v1.norm());
v1.addScaled(vec2, -1.0 / vec2.norm());
distance = v1.norm();
return 1-distance;
}