Added ability to calculate "distance" between two log documents by using DotProduct.