Lucene Cosine Similarity Adapted from https://computergodzilla.blogspot.com.tr/2015/01/calculate-cosine-similarity-using.html License MIT