Lucene多字段排序备忘(Sorting by multiple fields)

一:多字段排序  可以如下构造Sort。

example.displayHits(allBooks,
new Sort(new SortField[]{
new SortField("category"),
SortField.FIELD_SCORE,
new SortField("pubmonth", SortField.INT, true)
}));

备注:knowing that sorting by a String is the most expensive type in terms
of resources(对字符型数据排序是最耗资源的)

-------参考<<Lucene in Action>>。

原文地址:https://www.cnblogs.com/likehua/p/2461153.html