You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "James Dyer (JIRA)" <ji...@apache.org> on 2015/12/04 21:20:10 UTC

[jira] [Closed] (LUCENE-3341) Spellcheker is not checking word with less than 3 characters

     [ https://issues.apache.org/jira/browse/LUCENE-3341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Dyer closed LUCENE-3341.
------------------------------
    Resolution: Not A Problem

We can do what the user wants, using DirectSolrSpellChecker and setting the "minQueryLength" parameter.

> Spellcheker is not checking word with less than 3 characters
> ------------------------------------------------------------
>
>                 Key: LUCENE-3341
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3341
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spellchecker
>    Affects Versions: 3.2
>         Environment: Window XP, Java 6, JBoss 4.2.3GA
>            Reporter: Devang Panchal
>             Fix For: 3.2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> *Problem:* SpellChecker is not checking spelling of a word less than 3 characters. i.e "en", "am", "an", etc. So these words are getting misspelled in result.
> *Cause:*
> org.apache.lucene.search.spell.SpellChecker class is not adding in index dictionary a word which has less than 3 characters. 
> The method indexDictionary() in SpellChecker class is ignoring all the characters less than 3 characters length and not adding them in index dictionary.
> *Example code:*
> SpellChecker luceneSpellChecker = null;
> luceneSpellChecker = new SpellChecker(new RAMDirectory(), new NGramDistance());
> luceneSpellChecker.indexDictionary(
> 				new PlainTextDictionary( new InputStreamReader(dictionaryFile, "UTF-8")),
> 				10, 500, false);
> System.out.println("Word 'an' exist? "+luceneSpellChecker.exist("an");
> System.out.println("Word 'am' exist? "+luceneSpellChecker.exist("am");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org