code: def facets(self, request):
          
          queryset = self.filter_facet_queryset(self.get_queryset())
  
          for facet in request.query_params.getlist(self.facet_query_params_text):
  
              if ":" not in facet:
                  continue
  
              field, value = facet.split(":", 1)
              if value:
                  queryset = queryset.narrow('%s:"%s"' % (field, queryset.query.clean(value)))
  
          serializer = self.get_facet_serializer(queryset.facet_counts(), objects=queryset, many=False)
          return Response(serializer.data)
docs: Sets up a list route for ``faceted`` results.
          This will add ie ^search/facets/$ to your existing ^search pattern.