IndexSearcher searcher = new IndexSearcher(reader);
TermQuery q = new TermQuery(new Term(FieldNames.PATH, text));
TopDocs top = searcher.search(q, 1);
if (top.totalHits == 0) {
mlt.setFieldNames(fields);
moreLikeThisQuery = mlt.like(new StringReader(text), mlt.getFieldNames()[0]);
} else{
ScoreDoc d = top.scoreDocs[0];
Document doc = reader.document(d.doc);
List<String> fieldNames = new ArrayList<String>();
for (IndexableField f : doc.getFields()) {