apache / apache/lucene

Spellchecker - provide add/remove word methods [LUCENE-5276]

Open
#6,340 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

After creating the initial index the SpellChecker class does not provide methods to add/remove words.

The user is able to add/remove words to the F_WORD field and doing this is separate from the SpellChecker. The down side is that the added word is not available as a suggestion because it has not been added to the other 'out of the box' fields such as start/end/gram fields.

Please consider providing public addWord/removeWord methods.

---
Migrated from [LUCENE-5276](https://issues.apache.org/jira/browse/LUCENE-5276) by Johnny Jenkins

Contributor guide

Open the contributing guide

Research direction

Start by locating the SpellChecker class and reviewing how the F_WORD, start, end, and gram fields are built and updated after initial indexing. Trace the existing word-management path, then define the behavior of public addWord and removeWord methods. Done means added or removed words are reflected in suggestions across the relevant fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.