一:多字段排序  可以如下构造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>>。

相关文章:

  • 2021-08-26
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2021-07-20
  • 2022-12-23
  • 2021-12-19
  • 2021-10-18
  • 2021-10-04
  • 2022-12-23
相关资源
相似解决方案