If you're getting OOM's, double-check that you're on 3.3.  There was a nasty 
bug in 3.0 - 3.2 that would cause OOM in conjunction with spellcheck collations 
in some cases.  Ditto if Solr hangs as you might be in a Garbage Collection 
"loop".  If you have your jvm running with verbose gc's you'll see for sure in 
the server logs if this is happening.

With that said, collations shouldn't cause memory problems with 3.3.  Also, 
"maxCollationEvaluations" really is just to be sure the query doesn't run too 
long looking for spell correction possibilities.  It shouldn't affect memory 
usage, which will be low in any case (on 3.3).  

(although if you are getting OOMs on 3.3 and if you're pretty sure your heap is 
big enough, please post a stack trace!)

You might want to test some queries with all of these parameters enabled:

spellcheck=true
spellcheck.count=10
spellcheck.extendedResults=true
spellcheck.collate=true
spellcheck.collateExtendedResults=true
spellcheck.maxCollationTries=10
spellcheck.maxCollations=1

...the run some test queries and check in the spelling response.  This will 
show you all of the invidual word possibilities and then below that you'll get 
a collation if it could find a combination that can return hits.  Then note:

- If you get nothing from spellcheck, be sure you did a "spellcheck.build" 
since the last restart (or since you committed your data).

- If the "correct" version of one of your misspelled words isn't in the lists 
in the first section, try a highter "spellcheck.count".  However, if that word 
is in the index, there is no hope because Solr won't suggest a word for 
something in the index (but see 
https://issues.apache.org/jira/browse/SOLR-2585).

- If you see all the corrections in the individual lists, but not in a 
collation, try increasing "maxCollationTries" and/or "maxCollations" and see if 
it suggests it.  If all else fails, set "maxCollationTries" to zero and 
"maxCollations" to something higher.  Just keep in mind that with 
"maxCollationTries" at zero, the collations aren't guaranteed to return any 
hits.

- I'm not so sure shingles will work with the collation feature at all.

- I've heard that when using shingles, you have to put the query in 
"spellcheck.q" to get it to work.  But I've never used shingles with spellcheck 
before so I'm not sure.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: O. Klein [mailto:kl...@octoweb.nl] 
Sent: Tuesday, July 26, 2011 9:07 AM
To: solr-user@lucene.apache.org
Subject: RE: Spellcheck compounded words

Using ShingleFilterFactory and PositionFilterFactory I get some results, but
never as a useful collation.

So I tried to see what results with spellcheck.maxCollations=2 would be, but
I never got this to work. not on 3.3 nor 4.0. Even lowering
maxCollationEvaluations had no effect. I never get a response from Solr. Or
an OOM exception.

Anyone else experiencing this?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spellcheck-compounded-words-tp3192748p3200418.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to