问题
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?
来源:https://stackoverflow.com/questions/66001866/how-to-group-results-of-a-lucene-query-count-the-hits-by-group-and-highlight-th