StringBuffer sb = new StringBuffer();
ScoreDoc[] sd = hits.scoreDocs;
long[] uids = new long[sd.length];
sb.append("\n");
for (int i = 0; i < sd.length; i++) {
Document doc = reader.document(sd[i].doc);
uids[i] = Long.parseLong(doc.get("id"));
}
Arrays.sort(uids);
sb.append(Thread.currentThread() + Arrays.toString(uids)).append("\n");
int max = reader.maxDoc();