java code for words frequencies with lucene 4.6