How to group results of a Lucene query, count the hits by group and highlight the documents in some selected group?

浪子不回头ぞ 提交于 2021-02-10 14:21:43

问题


I have different types of documents each of which may have multiple authors and upon searching I would like:

  1. results to be grouped by author such that I can count the number of documents of each type by each author and
  2. use the highlighter to highlight the documents belonging to a selected author.

How should I index the documents and search on them to achieve this? Particularly, how to perform grouping when I have multiple authors for a document and the documents are of different types?

来源:https://stackoverflow.com/questions/66001866/how-to-group-results-of-a-lucene-query-count-the-hits-by-group-and-highlight-th

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!