<http://stackoverflow.com/questions/28368378/suggestions-are-not-sorting-on-frequency-using-comparatorfreq-freqnot-working#> I have created 2 nodes having *2 shards* in Solr. I am doing *spell correction technique*. I want to *sort* the *suggestions* of *query(abple)* on the basis on *frequency*. By *default*, it is *sorting* on *score*(Levenshtein Distance).
I added <str name="comparatorClass">freq</str> in *solr.SpellCheckComponent* of *solrconfig.xml*. But still, it is *not* working. *Current suggestions are sorted on score (Not required):* "suggestion":[{ "word":"apple", "freq":23}, { "word":"ample", "freq":5}, { "word":"abele", "freq":3}, { "word":"able", "freq":176}}] *Require suggestions to sort on frequency (Required):* "suggestion":[{ "word":"able", "freq":176}}, { "word":"apple", "freq":23}, { "word":"ample", "freq":5}, { "word":"abele", "freq":3}}]