//create
Document doc = new Document();
//get value from JDBC ResultSet
doc.add(new LongDocValuesField("LastContactTime", rs.getLong("LastContactTime")));
//....
//Search
Sort sort = new Sort(new SortField("LastContactTime",
SortField.Type.LONG, false));
TopDocs rs = scher.search(query, total, sort);
结果排序不正确,为什么?我正在使用 Lucene4.0