I do not know what it would take to have the collation tests make betetr use of 
the QueryResultCache.  However, outside of a test scenario, I do not know if 
this would help a lot.

Hopefully you wouldn't have a lot of users issuing the exact same query with 
the exact same misspelled words over and over.  In the real world, if you find 
that a collation is a better query than the one the user intially issued, then 
when that user pages through results, etc, your application should use the 
corrected query and not re-run the incorrect query over and over again.  In the 
case of "maxResultsForSuggest", if a user does the first query then rejects any 
"did-you-mean" suggstions, you can just turn spellcheck off if they page, 
facet, etc, so that you don't have to generate these suggestions over and over 
again.  

You do have to weigh when setting "maxCollationTries" whether or not it is 
acceptable to make a user with a misspelled query wait 1/2 second or so to 
(hopefully) get a correction, or if you want to simply reduce the maximum time 
someone will have to wait.  If you find that it usually needs 10 tries to find 
a good collation, then you probably need to try a different distance algorithm, 
or play with the various accuracy settings to see if you can get better 
corrections to be nearer the top of the individual-word lists.  Also, try 
setting "alternativeTermCount" lower than "count" (maybe set "atc" to 1/2 of 
what you have "count").  This will reduce the number of terms it has to try 
combinations of.  If you set "maxResultsForSuggest" to a lower value (like 2-3, 
maybe), then it won't try to return "did-you-mean" suggestions for queries 
returning (was it 35?!) hits.

As I mentioned, SOLR-3240 does have promise of speeding this feature up so 
maybe we won't have to talk about these kinds of trade-offs so much in the 
future.

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: SandeepM [mailto:skmi...@hotmail.com] 
Sent: Friday, April 19, 2013 12:48 PM
To: solr-user@lucene.apache.org
Subject: RE: DirectSolrSpellChecker : vastly varying spellcheck QTime times.

James,
Thanks for the reply.  I see your point and sure enough, reducing
maxCollationTries does reduce time, however may not produce results.
It seems like the time is taken for the collations re-runs.  Is there any
way we can activate caching for collations.  The same query repeatedly takes
the same amount of time.  My queryCaches are activated, however don't
believe it gets used for spellchecks.
Thanks.
-- Sandeep



--
View this message in context: 
http://lucene.472066.n3.nabble.com/DirectSolrSpellChecker-vastly-varying-spellcheck-QTime-times-tp4057176p4057389.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to