SynonymFilter behaves not as expected with "ignoreCase=true" [LUCENE-6832]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
SynonymFilter with "ignoreCase=true" does not work as expected:
- Uppercase words in the SynonymMap are never matched
- Uppercase words will be lowercase in the resulting TokenStream regardless if being matched or not
It seems like the SynonymMap pretty much screws up if you pass it an uppercase version of a word.
---
Migrated from [LUCENE-6832](https://issues.apache.org/jira/browse/LUCENE-6832) by Jakob Demler
Attachments: [LUCENE-6832.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-6832/LUCENE-6832.patch)
Contributor guide
Research direction
Start by reading SynonymFilter and SynonymMap, then reproduce the two reported cases: uppercase entries not matching and tokens being lowercased unexpectedly with ignoreCase=true. Done means uppercase synonym entries match correctly and unrelated uppercase tokens retain their expected case; add regression coverage for both behaviors.
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