lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GVK Prasad <gvkpra...@yahoo.com.INVALID>
Subject RE: Solr Spellcheck
Date Tue, 28 Nov 2017 04:14:04 GMT

Hi Alessandro,

My search and request handler are as included below. This config included  with   version
6.3.0

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <str name="queryAnalyzerFieldType">text_general</str>
  
    <!-- a spellchecker built from a field of the main index -->
    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">term</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
      <!-- the spellcheck distance measure used, the default is the internal levenshtein
-->
      <str name="distanceMeasure">internal</str>
      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
      <float name="accuracy">0.5</float>
      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
      <int name="maxEdits">2</int>
      <!-- the minimum shared prefix when enumerating terms -->
      <int name="minPrefix">1</int>
      <!-- maximum number of inspections per result. -->
      <int name="maxInspections">5</int>
      <!-- minimum length of a query term to be considered for correction -->
      <int name="minQueryLength">4</int>
      <!-- maximum threshold of documents a query term can appear to be considered for
correction -->
      <float name="maxQueryFrequency">0.01</float>
      <!-- uncomment this to require suggestions to occur in 1% of the documents
        <float name="thresholdTokenFrequency">.01</float>
      -->
    </lst>
  </searchComponent>

  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
    <lst name="defaults">
      <!-- Solr will use suggestions from both the 'default' spellchecker
           and from the 'wordbreak' spellchecker and combine them.
           collations (re-written queries) can include a combination of
           corrections from both spellcheckers -->
      <str name="spellcheck.dictionary">default</str>
      <str name="spellcheck">on</str>
      <str name="spellcheck.extendedResults">true</str>
      <str name="spellcheck.count">10</str>
      <str name="spellcheck.alternativeTermCount">5</str>
      <str name="spellcheck.maxResultsForSuggest">5</str>
      <str name="spellcheck.collate">true</str>
      <str name="spellcheck.collateExtendedResults">true</str>
      <str name="spellcheck.maxCollationTries">10</str>
      <str name="spellcheck.maxCollations">5</str>
    </lst>
    <arr name="last-components">
      <str>spellcheck</str>
    </arr>
  </requestHandler>

My schema file is 40kb so including below only the fields added my me
 <field name="active" type="text_en" indexed="true" stored="true"/>
  <field name="caseSignificanceid" type="text_en" indexed="true" stored="true"/>
  <field name="changeindicator" type="string" indexed="true" stored="true"/>
  <field name="codetype" type="string" indexed="true" stored="true"/>
  <field name="conceptid" type="text_en" indexed="true" stored="true"/>
  <field name="deleteflag" type="int" indexed="true" stored="true"/>
  <field name="ecwstatus" type="string" indexed="true" stored="true"/>
  <field name="effectivetime" type="text_en" indexed="true" stored="true"/>
  <field name="id" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
  <field name="languagecode" type="text_en" indexed="true" stored="true"/>
  <field name="longdesc" type="string" indexed="true" stored="true"/>
  <field name="meddesc" type="string" indexed="true" stored="true"/>
  <field name="moduleid" type="text_en" multiValued="true" indexed="true" stored="true"/>
  <field name="name" type="text_general" indexed="true" stored="true"/>
  <field name="refid" type="long" indexed="true" stored="true"/>
  <field name="shortDesc" type="string" indexed="true" stored="true"/>
  <field name="snomedsearch" type="text_en" multiValued="true" indexed="true" stored="false"/>
  <field name="status" type="string" indexed="true" stored="true"/>
  <field name="term" type="text_en" indexed="true" stored="true"/>
  <field name="typeid" type="text_en" indexed="true" stored="true"/>
  <field name="validfrom" type="date" indexed="true" stored="true"/>
  <field name="validto" type="date" indexed="true" stored="true"/>

Thanks, 
Prasad. 

From: alessandro.benedetti
Sent: Monday, November 27, 2017 8:53 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr Spellcheck

Do you mean you are over-spellchecking ?
Correcting even "not mispelled words" ?

Can you give us the request handler configuration, spellcheck configuration
and the schema ?

Cheers



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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