Lucene Cosine Similarity and Spark Word Count Example