apache / apache/lucene

Spell checker puts a hard 3-letter limit on indexed words which affects suggestions [LUCENE-5707]

Open
#6,769 1 comment 0 reactions 0 assignees View on GitHub
affects-version:4.8.1 legacy-jira-priority:Major module:suggest type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

SVN r1055285 (committed for LUCENE-2391) introduced a hard limit on the minimum length required before including a word in the spell checker. This not only shows all 2-letter words as misspelled/not existing (unless the caller agrees that 2-letter words should not be checked for spelling) but 2-letter suggestions will never show up in a call to suggestSimilar(). It would be nice to have this limit reduced or, ideally, not hard-coded.

![an.png](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5707/an.png)

---
Migrated from [LUCENE-5707](https://issues.apache.org/jira/browse/LUCENE-5707) by Scott Van Wart
Environment:
```
Windows 7 / IntelliJ IDEA
```

Attachments: [an.png](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5707/an.png)

Contributor guide

Open the contributing guide

Research direction

Start by locating the spell checker code that enforces the minimum indexed-word length, then reproduce the reported behavior for two-letter words and suggestions. Done means the hard-coded three-letter restriction is reduced or made configurable so two-letter words can be checked and returned by suggestSimilar().

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.