Can results collapsing[1] be of use for you ? if it is the case, you can use that feature and explore its flexibility in selecting the group head :
1) min | max for a numeric field 2) min | max for a function query 3) sort [1] https://lucene.apache.org/solr/guide/6_6/collapse-and-expand-results.html Cheers ----- --------------- Alessandro Benedetti Search Consultant, R&D Software Engineer, Director Sease Ltd. - www.sease.io -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html