Got it.  Took a quick look at the code and I see it uses the maximum frequency 
of the terms.  And in your case, one of these terms ("holy" and "wood"), occurs 
71,000 times.  It wouldn't be too difficult to change this to use the average 
frequency of the terms or the minimum.  But currently the only options is to 
use the maximum or the sum of the frequencies.  Possibly the minimum is a 
better predictor of how relevant a suggestion is though.

James Dyer
Ingram Content Group


-----Original Message-----
From: O. Klein [mailto:kl...@octoweb.nl] 
Sent: Tuesday, February 10, 2015 1:27 PM
To: solr-user@lucene.apache.org
Subject: RE: alternativeTermCount and WordBreakSolrSpellChecker combination not 
working

I did some testing and the order of dictionaries doesn't seem to have an
effect. They are sorted by frequency. So if mm was applied "holy wood" would
have a lower frequency and solve this problem.

  "suggestions":[
      "holywood",{
        "numFound":4,
        "startOffset":0,
        "endOffset":8,
        "origFreq":4,
        "suggestion":[{
            "word":"holy wood",
            "freq":71828},
          {
            "word":"hollywood",
            "freq":2669},
          {
            "word":"holyrood",
            "freq":14},
          {
            "word":"homewood",
            "freq":737}]},
      "correctlySpelled",false,
      "collation","(holy wood)",
      "collation","hollywood"]}}



--
View this message in context: 
http://lucene.472066.n3.nabble.com/alternativeTermCount-and-WordBreakSolrSpellChecker-combination-not-working-tp4185352p4185461.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to