lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From satya swaroop <sswaro...@gmail.com>
Subject Re: spell checking....
Date Tue, 27 Jul 2010 05:29:18 GMT
This is in solrconfig.xml:::::::::::

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
      <lst name="spellchecker">
          <str name="name">default</str>

      <str name="classname">solr.IndexBasedSpellChecker</str>

      <str name="field">spell</str>
           <str name="spellcheckIndexDir">./spellchecker</str>
           <str name="accuracy">0.7</str>
     <str name="buildOnCommit">true</str>
    <str name="buildOnOptimize">true</str>
    </lst>

    <lst name="spellchecker">
      <str name="name">jarowinkler</str>
      <str name="field">lowerfilt</str>
      <str
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
      <str name="spellcheckIndexDir">./spellchecker</str>
      <str name="buildOnCommit">true</str>
      <str name="buildOnOptimize">true</str>
    </lst>

      <str name="queryAnalyzerFieldType">textSpell</str>
</searchComponent>

<!--
  The SpellingQueryConverter to convert raw (CommonParams.Q) queries into
tokens.  Uses a simple regular expression
  to strip off field markup, boosts, ranges, etc. but it is not guaranteed
to match an exact parse from the query parser.

  Optional, defaults to solr.SpellingQueryConverter
-->
<queryConverter name="queryConverter"
class="org.apache.solr.spelling.SpellingQueryConverter"/>

********************************************************************************
 i added the following in standard request handler::::::::::

<requestHandler name="standard" class="solr.SearchHandler" 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>
    <!-- Optional, must match spell checker's name as defined above,
defaults to "default" -->
      <str name="spellcheck.dictionary">default</str>
      <!-- omp = Only More Popular -->
      <str name="spellcheck.onlyMorePopular">false</str>
      <!-- exr = Extended Results -->
      <str name="spellcheck.extendedResults">false</str>
      <!--  The number of suggestions to return -->
      <str name="spellcheck.count">1</str>
    </lst>
     <arr name="last-components">
      <str>spellcheck</str>
    </arr>

  </requestHandler>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message