James, Thanks for clearly stating this , I was not able to find this documented anywhere, yes I am using it with another spell checker (Direct) with the collation on. I will try the maxChangtes and let you know.
On a side note , whenever I change the spellchecker parameter , I need to rebuild the index and delete the solr data directory before that as my Tomcat instance would not even start, can you let me know why ? Thanks. On Tue, May 27, 2014 at 12:21 PM, Dyer, James <james.d...@ingramcontent.com> wrote: > You can do this if you set it up like in the mail Solr example: > > <lst name="spellchecker"> > <str name="name">wordbreak</str> > <str name="classname">solr.WordBreakSolrSpellChecker</str> > <str name="field">name</str> > <str name="combineWords">true</str> > <str name="breakWords">true</str> > <int name="maxChanges">10</int> > </lst> > > The "combineWords" and "breakWords" flags let you tell it which kind of > workbreak correction you want. "maxChanges" controls the maximum number of > words it can break 1 word into, or the maximum number of words it can > combine. It is reasonable to set this to 1 or 2. > > The best way to use this is in conjunction with a "regular" spellchecker > like DirectSolrSpellChecker. When used together with the collation > functionality, it should take a query like "mob ile" and depending on what > actually returns results from your data, suggest either "mobile" or perhaps > "mob lie" or both. The one thing is cannot do is fix a transposition or > misspelling and combine or break words in one shot. That is, it cannot > detect that "mob lie" should become "mobile". > > James Dyer > Ingram Content Group > (615) 213-4311 > > > -----Original Message----- > From: S.L [mailto:simpleliving...@gmail.com] > Sent: Saturday, May 24, 2014 4:21 PM > To: solr-user@lucene.apache.org > Subject: Wordbreak spellchecker excessive breaking. > > I am using Solr wordbreak spellchecker and the issue is that when I search > for a term like "mob ile" expecting that the wordbreak spellchecker would > actually resutn a suggestion for "mobile" it breaks the search term into > letters like "m o b" I have two issues with this behavior. > > 1. How can I make Solr combine "mob ile" to mobile? > 2. Not withstanding the fact that my search term "mob ile" is being broken > incorrectly into individual letters , I realize that the wordbreak is > needed in certain cases, how do I control the wordbreak so that it does not > break it into letters like "m o b" which seems like excessive breaking to > me ? > > Thanks. >