Lucene's grouping module
Packages 
Package Description
org.apache.lucene.search.grouping
This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.