Hi Ryan,
"eappointment" has a Leveinstein distance of 1 edit from "appointment" ( 1
insertion) .
There's should be any problem to provide that suggestion, as the solr
spellcheck supports up to 2 edits as a maximum distance.

Cheers

On 27 November 2015 at 03:41, Ryan Yacyshyn <ryan.yacys...@gmail.com> wrote:

> Hi all,
>
> Is it possible to provide spelling suggestions if it's just the first
> character that's wrong (or has an additional character added)?
>
> We have users querying for "eappointment" when they should just be
> searching for "appointment". I'd like to show "appointment" as a spelling
> suggestion for "eappointment".
>
> Is this possible?
>
> I'm using 4.10.1 and below are my configs:
>
> *<!-- the **spellchecking** defaults in my **requestHandler** -->*
> <str name="spellcheck">on</str>
> <str name="spellcheck.extendedResults">false</str>
> <str name="spellcheck.count">1</str>
> <str name="spellcheck.alternativeTermCount">1</str>
> <str name="spellcheck.maxResultsForSuggest">1</str>
> <str name="spellcheck.collate">true</str>
> <str name="spellcheck.collateExtendedResults">false</str>
> <str name="spellcheck.maxCollationTries">5</str>
> <str name="spellcheck.maxCollations">1</str>
>
> *<!-- **spellchecking** component -->*
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>   <!-- a spellchecker built from a field of the main index -->
>   <lst name="spellchecker">
>     <str name="name">default</str>
>     <str name="field">spell</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>
>   </lst>
> </searchComponent>
>
> Thanks,
> Ryan
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Reply via email to