You have specified "spellcheck.q" in your query.  The whole purpose of 
"spellcheck.q" is to bypass any query converter you've configured giving it raw 
keywords instead.

But possibly a custom query converter is not your best answer?

I agree that charles > charlie is an edit distance of 2, so if everything is 
set up correctly then DirectSolrSpellChecker with maxEdits=2 should find it.  
The collate functionality as you have it set up would check the index and only 
give you re-written queries that are guaranteed to return hits.  But there is a 
big caveat:  If the word "charles" occurs at all in the dictionary (because any 
document in your index contains it), then the spellchecker (by default) assumes 
it is a correctly-spelled word and will not try to correct it.  In this case, 
specify spellcheck.alternateTermCount with a non-zero value. (See 
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.alternativeTermCount)
  

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: skmirch [mailto:skmi...@hotmail.com] 
Sent: Wednesday, April 03, 2013 12:19 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr Multiword Search

I have been trying to use the MultiWordSpellingQueryConverter.java since I
need to be able to find the document that correspond to the suggested
collations.  At the moment it seems to be producing collations based on word
matches and arbitrary words from the field are picked up to form collation
and so nothing corresponds to any of the titles in our set of indexed
documents.

Could anyone please confirm that this would work if I took the following
steps.

steps:
1. Get the solr4.2.war file.
2. Get to the WEB-INF lib and add the lucene-core-4.2.0.jar and the
solr-core-4.2.0.jar that to the classpath to compile the
MultiWordSpellingQueryConverter.java . The code for this is in my previous
post in this thread.
3. jar cvf multiwordspellchecker.jar
com/foo/MultiWordSpellingQueryConverter.java
4. Copy this jar to the $SOLR_HOME/lib directory.
6. Define queryConverter.  Question: Where does this need to go? I have just
put this somewhere between the searchComponent and the requestHandler for
spell checks.
5. Start webserver. I see this jar file getting registered at startup:
2013-04-03 12:56:22,243 INFO  [org.apache.solr.core.SolrResourceLoader]
(coreLoadExecutor-3-thread-1) Adding
'file:/solr/lib/multiwordspellchecker.jar' to classloader
6. When I run the spell query, I don't see my print statements, so I am not
sure if this code is really being called.  I don't think it may be the
logging that is failing but rather this code not being called at all.

I would appreciate any information on what I might be doing wrong.  Please
help.

Thanks.
Regards,
-- Sandeep



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Multiword-Search-tp4053038p4053534.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to