The Clustering module for Solr provides a generic mechanism for plugging in third party clustering implementations. It currently provides clustering support for search results using the Carrot2 project.
See https://solr.apache.org/guide/solr/latest/query-guide/result-clustering.html for how to get started.