We are using Solr 1.3 and trying to get spell checking functionality.

FYI, our index contains a lot of medical terms (which might or might
not make a difference as they are not English-y words, if that makes
any sense?)

If I specify a spellcheck query of "spellcheck.q=diabtes"

I get suggestions of:

<str>diabet</str>
<str>diabetogen</str>
<str>dilat</str>
<str>diamet</str>
<str>diatom</str>
<str>diastol</str>
<str>diactin</str>
<str>dialect</str>

If I re-mis-spell Diabetes to "q=diabets" then I go no suggestions.

So first off two things:

1) Why would leaving out one "e" over the other affect the spelling
suggestions so substantially?
2) In the former list of suggestions, notice the first suggestion is
"diabet", which isnt all that helpful, it should return something like
"diabetes" or maybe even "diabetic".

Note that if I do a normal search against "diabetes" then I get a ton
of results, in other words, our index is filled with terms of
"diabetes".

My relevant solrconfig is:


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

    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">text_t</str>
      <str name="spellcheckIndexDir">./spellchecker1</str>
      <str name="accuracy">0.1</str>

    </lst>
    <lst name="spellchecker">
      <str name="name">jarowinkler</str>
      <str name="field">text_t</str>
      <!-- Use a different Distance Measure -->
      <str 
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
      <str name="spellcheckIndexDir">./spellchecker2</str>
      <str name="accuracy">0.1</str>

    </lst>

and I have

spellcheck.count = 8

Notice that I severely bumped down the "accuracy" setting to get more
results. Bumping it up higher yields less results (not sure what
setting really meant so I dont know in what direction I want to change
that value - I am guessing that a lower value allows for more
mis-spellings, e.g. its more promiscuous).

Our "text" and "text_t" fields are defined in schema.xml as:

<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
and
<dynamicField name="*_t" type="text"       indexed="true"
stored="true" multiValued="true" />

Any help would be appreciated.

Thanks
-Rupert

Reply via email to