Hi all, I'm new to Solr and have been reading up as much as possible,
especially about implementing the spellcheck feature.

The instructions I'm looking at are on the following links:
> http://wiki.apache.org/solr/SpellCheckComponent
> http://snipurl.com/elxmr [vufind tech list]

Error I get when I try to build the index using
$SOLR_URL/solr/biblio/spellCheckCompRH?q=*:*&spellcheck.q=hell&spellcheck=true&spellcheck.build=true

  NOT_FOUND
  RequestURI=/solr/biblio/spellCheckCompRH
  Powered by Jetty://

I've tried it with a separate request handler "/spellCheckCompRH" and
also integrating it into the regular one "/search" but it just doesn't
want to work. Do I need to restart something after changes to
schema/solrconfig files? I looked through the docs and mailing lists but
couldn't figure out what I'm doing wrong and I don't think any restart
is required.

I've attached my schema & solrconfig hoping it's useful...any help will
be appreciated! : )

-- 

- - - - - - - - - - - - - - - - - - - - - - - - -
Anoop Atre
IS Developer & Integrator, MnPALS
PH: 507.389.5060
OF: 3022 Memorial Library (Office-ML 3022)
--
"Mit der Dummheit kämpfen Götter selbst vergebens"
 ~ Johann Christoph Friedrich von Schiller
    <!-- Standard Text Field -->
    <fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="schema.UnicodeNormalizationFilterFactory" version="icu4j" composed="false" remove_diacritics="true" remove_modifiers="true" fold="true"/>
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
	<SNIP></SNIP>
    </fieldtype>
    <!-- Basic Text Field for use with Spell Correction -->
    <fieldtype name="textSpell" class="solr.TextField" positionIncrementGap="100" >
      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="schema.UnicodeNormalizationFilterFactory" version="icu4j" composed="false" remove_diacritics="true" remove_modifiers="true" fold="true"/>
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
    </fieldtype>
  </types>
 <fields>
   <!-- Core Fields  -->
   <field name="id" type="string" indexed="true" stored="true"/>
   <field name="fullrecord" type="string" indexed="false" stored="true"/>
   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
   <!-- This field is used to build the spellchecker index -->
   <field name="spelling" type="textSpell" indexed="true" stored="true" multiValued="true"/>
	<SNIP></SNIP>
 </fields>
 <uniqueKey>id</uniqueKey>
 <defaultSearchField>text</defaultSearchField>
 <!-- CopyFields for Spell Checking on Title/Text -->
<copyField source="title" dest="spelling"/>
<copyField source="text" dest="spelling"/>
 <!-- copyField source="allfields" dest="spelling"/ -->
	<SNIP></SNIP>
 <!-- Default Boolean Operator -->
 <solrQueryParser defaultOperator="OR"/>
</schema>
      
  <!-- requestHandler plugins... incoming queries will be dispatched to the
     correct handler based on the path or the qt (query type) param.
     Names starting with a '/' are accessed with the a path equal to the 
     registered name.  Names without a leading '/' are accessed with:
      http://host/app/select?qt=name
     If no qt is defined, the requestHandler that declares default="true"
     will be used.
  -->
  <requestHandler name="standard" class="solr.StandardRequestHandler" default="true">
    <!-- default values for query parameters -->
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       <!-- 
       <int name="rows">10</int>
       <str name="fl">*</str>
       <str name="version">2.1</str>
        -->
     </lst>
  </requestHandler>

  <requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
    <lst name="defaults">
      <str name="mlt.fl">manu,cat</str>
      <int name="mlt.mindf">1</int>
    </lst>
  </requestHandler>

  <!--
   
   Search components are registered to SolrCore and used by Search Handlers
   
   By default, the following components are avaliable:
    
   <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
   <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
   <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
   <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
   <searchComponent name="debug"     class="org.apache.solr.handler.component.DebugComponent" />
  
   If you register a searchComponent to one of the standard names, that will be used instead.
  
   -->
 
  <requestHandler name="/search" class="org.apache.solr.handler.component.SearchHandler">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
    </lst>

    <!--
    By default, this will register the following components:
    
    <arr name="components">
      <str>query</str>
      <str>facet</str>
      <str>mlt</str>
      <str>highlight</str>
      <str>debug</str>
    </arr>
    
    To insert handlers before or after the 'standard' components, use:
    
    <arr name="first-components">
      <str>first</str>
    </arr>
    
    <arr name="last-components">
      <str>last</str>
    </arr>
    
    -->
    <arr name="last-components">
      <str>spellcheck</str>
      <str>elevator</str>
    </arr>
  </requestHandler>

  <searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">

      <!-- global settings for spell check -->
      <str name="queryAnalyzerFieldType">textSpell</str>
      <str name="buildOnCommit">true</str>
      <str name="buildOnOptimize">true</str>

    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">spelling</str>
      <str name="accuracy">0.7</str>
      <str name="spellcheckIndexDir">./spellchecker</str>
    </lst>
    <lst name="spellchecker">
      <str name="name">jarowinkler</str>
      <str name="field">spelling</str>
      <!-- Use a different Distance Measure -->
      <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
      <str name="spellcheckIndexDir">./spellchecker_example</str>
      <str name="buildOnOptimize">true</str>
    </lst>

  </searchComponent>

  <queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>

  <requestHandler name="/spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler" startup="lazy">
    <lst name="defaults">
    <!-- By default, do spell check -->
        <str name="spellcheck">true</str>
    <!-- Defaults for the spell checker when used -->
        <!-- omp = Only More Popular -->
        <str name="spellcheck.onlyMorePopular">true</str>
        <!-- exr = Extended Results -->
        <str name="spellcheck.extendedResults">false</str>
        <!-- The number of suggestions to return -->
        <str name="spellcheck.count">1</str>
        <str name="spellcheck.collate">true</str>
	<!-- Next line is actually from Solr 1.2 Should Not be Needed! -->
	<str name="termSourceField">spelling</str>
    </lst>
    <arr name="last-components">
        <str>spellcheck</str>
    </arr>
  </requestHandler>

  <searchComponent name="elevator" class="org.apache.solr.handler.component.QueryElevationComponent" >
    <!-- pick a fieldType to analyze queries -->
    <str name="queryFieldType">string</str>
    <str name="config-file">elevate.xml</str>
  </searchComponent>
 
  <requestHandler name="/elevate" class="org.apache.solr.handler.component.SearchHandler" startup="lazy">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
    </lst>
    <arr name="last-components">
      <str>elevator</str>
    </arr>
  </requestHandler>

Reply via email to