> I know that solr has functions like > termfreq and that works fine for single > words. > How can I do the same count but for a phrase?
You can use ShingleFilterFactory at index time. http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory