apache / apache/lucene

Flexible Queryparser has some Locale violation with lowercasing [LUCENE-3317]

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

Description

When reviewing the flexible queryparser with my GSoC student, I found some String.toLowerCase() calls without locale. Also some code iterates per-char and lowercases. We should fix this to behave exactly like LowerCaseFilter.

Maybe we can make the queryparser pass all tokens to lowercase through a KeywordTokenizer->LowerCaseFilter chain, but this would create dependency to analysis module.

---
Migrated from [LUCENE-3317](https://issues.apache.org/jira/browse/LUCENE-3317) by Uwe Schindler (@uschindler)

Contributor guide

Open the contributing guide

Research direction

Start in the flexible queryparser entry points mentioned by the issue and locate String.toLowerCase() calls and per-character lowercasing. Compare their behavior with LowerCaseFilter, then determine how to achieve identical token lowercasing while resolving whether a dependency on the analysis module is acceptable; done means locale-correct queryparser behavior.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.