inside your request handler try to put spellcheck true and name of the 
spellcheck dictionary

hth

Alex.

 

 

 

-----Original Message-----
From: davers <dboych...@improvementdirect.com>
To: solr-user <solr-user@lucene.apache.org>
Sent: Thu, Apr 11, 2013 6:24 pm
Subject: Spellchecker not working for Solr 4.1


This is almost the same exact setup I was using in solr 3.6 not sure why it's
not working. Here is my setup.

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <str name="queryAnalyzerFieldType">textSpell</str>
    
    
   <lst name="spellchecker">
     <str name="name">default</str>
     <str name="field">spell</str>
     <str name="classname">solr.DirectSolrSpellChecker</str>
     
     <str name="distanceMeasure">internal</str>
     
     <float name="accuracy">0.7</float>
     
      <int name="maxEdits">2</int>
     
     <int name="minPrefix">1</int>
     
     <int name="maxInspections">5</int>
     
     <int name="minQueryLength">4</int>
     
     <float name="maxQueryFrequency">0.01</float>
     
   </lst>
   
    
    
   
    
   
    
   
 </searchComponent>
 
 
<requestHandler name="/productQuery" class="solr.SearchHandler">
            <lst name="defaults">
              <str name="df">text</str>
              <str name="defType">edismax</str>
                  <float name="tie">0.01</float>
                  <str name="qf">
                    sku^9.0 upc^9.1 uniqueid^9.0 series^2.8 productTitle^1.2
productid^9.0 manufacturer^4.0 masterFinish^1.5 theme^1.1 categoryName^0.2
finish^1.4
                  </str>
                  <str name="pf">
                    text^0.2 productTitle^1.5 manufacturer^4.0 finish^1.9
                  </str>
                  <str name="bf">
                    linear(popularity_82_i,1,2)^3.0
                  </str>
                  <str name="fl">
                    uniqueid,productid,manufacturer
                  </str>
                  <str name="mm">
                    3&lt;-1 5&lt;-2 6&lt;90%
                  </str>
                  <bool name="group">true</bool>
                  <str name="group.field">groupid</str>
                  <bool name="group.ngroups">true</bool>
                  <int name="ps">1000000</int>
                  <int name="qs">3</int>
              <int name="spellcheck.count">10</int>
              <bool name="spellcheck.collate">true</bool>
              <int name="spellcheck.maxCollations">10</int>
              <int name="spellcheck.maxCollationTries">100</int>
                </lst>
            <arr name="last-components">
              <str>spellcheck</str>
            </arr>
          </requestHandler>


<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100" omitNorms="true">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.PatternReplaceFilterFactory"
pattern="([\.,;:_/\-])" replacement=" " replace="all"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
        <filter class="solr.PatternReplaceFilterFactory"
pattern="([\.,;:_/\-])" replacement=" " replace="all"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldType>


This is what I see in my logs when I attempt a spellcheck

INFO: [productindex] webapp=/solr path=/select
params={spellcheck=false&group.distributed.first=true&tie=0.01&spellcheck.maxCollationTries=100&distrib=false&version=2&NOW=1365729795603&shard.url=solr-shard-1.sys.id.build.com:8080/solr/productindex/|solr-shard-4.sys.id.build.com:8080/solr/productindex/&fl=id,score&df=text&bf=%0a%09%09++++linear(popularity_82_i,1,2)^3.0%0a%09%09++&group.field=groupid&spellcheck.count=10&qs=3&spellcheck.build=true&mm=%0a%09%09++++3<-1+5<-2+6<90%25%0a%09%09++&group.ngroups=true&spellcheck.maxCollations=10&qf=%0a%09%09++++sku^9.0+upc^9.1+uniqueid^9.0+series^2.8+productTitle^1.2+productid^9.0+manufacturer^4.0+masterFinish^1.5+theme^1.1+categoryName^0.2+finish^1.4%0a%09%09++&wt=javabin&spellcheck.collate=true&defType=edismax&rows=10&pf=%0a%09%09++++text^0.2+productTitle^1.5+manufacturer^4.0+finish^1.9%0a%09%09++&start=0&q=fuacet&group=true&isShard=true&ps=1000000}
status=0 QTime=13
Apr 11, 2013 6:23:15 PM
org.apache.solr.handler.component.SpellCheckComponent finishStage
INFO:
solr-shard-2.sys.id.build.com:8080/solr/productindex/|solr-shard-5.sys.id.build.com:8080/solr/productindex/
null
Apr 11, 2013 6:23:15 PM
org.apache.solr.handler.component.SpellCheckComponent finishStage
INFO:
solr-shard-3.sys.id.build.com:8080/solr/productindex/|solr-shard-6.sys.id.build.com:8080/solr/productindex/
null
Apr 11, 2013 6:23:15 PM
org.apache.solr.handler.component.SpellCheckComponent finishStage
INFO:
solr-shard-1.sys.id.build.com:8080/solr/productindex/|solr-shard-4.sys.id.build.com:8080/solr/productindex/
null



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Spellchecker-not-working-for-Solr-4-1-tp4055450.html
Sent from the Solr - User mailing list archive at Nabble.com.

 

Reply via email to