How to group results of a Lucene query, count the hits by group and highlight the documents in some selected group?
问题 I have different types of documents each of which may have multiple authors and upon searching I would like: results to be grouped by author such that I can count the number of documents of each type by each author and 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? 来源: