'How to perform a facet query with Spring Data Solr

I'm trying to build an api for a Solr collection and I wonder how can I write a route that performs a facet query. I've seen the @Facet annotation, but I couldn't understand how can it be used with a @GetMapping route.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source