lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Müller <mm4...@googlemail.com>
Subject Re: Stop Words in SpellCheckComponent
Date Sat, 02 Jun 2012 09:51:17 GMT
> Also, generally, you should have a separate field and field type for the
> spellcheck field **so that normal text fields can use stop words.**

Now I've found a solution, although I'm not sure, if it's that what
you've meant:

Now I'm using a special fieldType WITHOUT stopwords for the spellcheck field.
So - I think - the SpellCheckComponent doesn't find better matches for
stopwords, because it has indexed the stopwords itself.

Thanks for your help

Matthias

schema.xml
.............
    <fieldType name="spellcheckType" class="solr.TextField"
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

   <field name="spellcheckField" type="spellcheckType" indexed="true"
stored="false"/>

solrconfig.xml
.............
  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">

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

    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">spellcheckField</str>

Mime
View raw message