apache / apache/lucene

Kuromoji fails with UnsupportedOperationException in case of duplicate keys in the user dictionary [LUCENE-7992]

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

Description

Failing is the right thing to do but the exception could clarify the source of the problem. Today it just throws an UnsupportedOperationException with no error message because of a call to PositiveIntOutputs.merge.

---
Migrated from [LUCENE-7992](https://issues.apache.org/jira/browse/LUCENE-7992) by Adrien Grand (@jpountz)

Contributor guide

Open the contributing guide

Research direction

Start by locating the Kuromoji user-dictionary handling that reaches PositiveIntOutputs.merge when duplicate keys are encountered. Trace how the UnsupportedOperationException is produced and identify the existing tests for duplicate user-dictionary keys. Done means the failure remains intentional but the exception clearly identifies the source of the problem.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.