DirectSpellChecker needs better parameter checks [LUCENE-8147]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
This thing has a lot of parameters (and option setters too), but looks like it really needs better checks. For example if i ask for zero suggestions I think it may give a confusing NPE instead: [SOLR-11858](https://issues.apache.org/jira/browse/SOLR-11858)
There are probably other cases too: we should add all the missing checks and give IllegalArgumentExceptions and so on instead.
---
Migrated from [LUCENE-8147](https://issues.apache.org/jira/browse/LUCENE-8147) by Robert Muir (@rmuir)
Linked issues:
- [SOLR-11858](https://issues.apache.org/jira/browse/SOLR-11858)
Contributor guide
Research direction
Start with the DirectSpellChecker entry point and review the linked SOLR-11858 example for the zero-suggestions case. Identify the other invalid parameters and option setters that lack checks, then verify that each rejects invalid input with an appropriate exception and tests cover the cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100